Message ID | 20210211014144.881861-1-sukadev@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d4083d3c00f60a09ad82e3bf17ff57fec69c8aa6 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/1] ibmvnic: Set to CLOSED state even on error | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 7 maintainers not CCed: linuxppc-dev@lists.ozlabs.org mpe@ellerman.id.au davem@davemloft.net paulus@samba.org benh@kernel.crashing.org kuba@kernel.org tlfalcon@linux.vnet.ibm.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 3 this patch: 3 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 10 Feb 2021 17:41:43 -0800 you wrote: > If set_link_state() fails for any reason, we still cleanup the adapter > state and cannot recover from a partial close anyway. So set the adapter > to CLOSED state. That way if a new soft/hard reset is processed, the > adapter will remain in the CLOSED state until the next ibmvnic_open(). > > Fixes: 01d9bd792d16 ("ibmvnic: Reorganize device close") > Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> > Reported-by: Abdul Haleem <abdhalee@in.ibm.com> > > [...] Here is the summary with links: - [1/1] ibmvnic: Set to CLOSED state even on error https://git.kernel.org/netdev/net/c/d4083d3c00f6 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 96c2b0985484..ce6b1cb0b0f9 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1367,10 +1367,8 @@ static int __ibmvnic_close(struct net_device *netdev) adapter->state = VNIC_CLOSING; rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_DN); - if (rc) - return rc; adapter->state = VNIC_CLOSED; - return 0; + return rc; } static int ibmvnic_close(struct net_device *netdev)
If set_link_state() fails for any reason, we still cleanup the adapter state and cannot recover from a partial close anyway. So set the adapter to CLOSED state. That way if a new soft/hard reset is processed, the adapter will remain in the CLOSED state until the next ibmvnic_open(). Fixes: 01d9bd792d16 ("ibmvnic: Reorganize device close") Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> Reported-by: Abdul Haleem <abdhalee@in.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)