From: Dany Madden <drt@linux.ibm.com> To: davem@davemloft.net, kuba@kernel.org Cc: drt@linux.ibm.com, sukadev@linux.ibm.com, tlfalcon@linux.ibm.com, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed Date: Tue, 20 Apr 2021 17:35:17 -0400 [thread overview] Message-ID: <20210420213517.24171-1-drt@linux.ibm.com> (raw) When ibmvnic gets a FATAL error message from the vnicserver, it marks the Command Respond Queue (CRQ) inactive and resets the adapter. If this FATAL reset fails and a transmission timeout reset follows, the CRQ is still inactive, ibmvnic's attempt to set link down will also fail. If ibmvnic abandons the reset because of this failed set link down and this is the last reset in the workqueue, then this adapter will be left in an inoperable state. Instead, make the driver ignore this link down failure and continue to free and re-register CRQ so that the adapter has an opportunity to recover. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden <drt@linux.ibm.com> Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com> Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> --- Changes in V2: - Update description to clarify background for the patch - Include Reviewed-by tags --- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index ffb2a91750c7..4bd8c5d1a275 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1970,8 +1970,10 @@ static int do_reset(struct ibmvnic_adapter *adapter, rtnl_unlock(); rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_DN); rtnl_lock(); - if (rc) - goto out; + if (rc) { + netdev_dbg(netdev, + "Setting link down failed rc=%d. Continue anyway\n", rc); + } if (adapter->state == VNIC_OPEN) { /* When we dropped rtnl, ibmvnic_open() got -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Dany Madden <drt@linux.ibm.com> To: davem@davemloft.net, kuba@kernel.org Cc: tlfalcon@linux.ibm.com, netdev@vger.kernel.org, paulus@samba.org, drt@linux.ibm.com, sukadev@linux.ibm.com, linuxppc-dev@lists.ozlabs.org Subject: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed Date: Tue, 20 Apr 2021 17:35:17 -0400 [thread overview] Message-ID: <20210420213517.24171-1-drt@linux.ibm.com> (raw) When ibmvnic gets a FATAL error message from the vnicserver, it marks the Command Respond Queue (CRQ) inactive and resets the adapter. If this FATAL reset fails and a transmission timeout reset follows, the CRQ is still inactive, ibmvnic's attempt to set link down will also fail. If ibmvnic abandons the reset because of this failed set link down and this is the last reset in the workqueue, then this adapter will be left in an inoperable state. Instead, make the driver ignore this link down failure and continue to free and re-register CRQ so that the adapter has an opportunity to recover. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden <drt@linux.ibm.com> Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com> Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> --- Changes in V2: - Update description to clarify background for the patch - Include Reviewed-by tags --- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index ffb2a91750c7..4bd8c5d1a275 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1970,8 +1970,10 @@ static int do_reset(struct ibmvnic_adapter *adapter, rtnl_unlock(); rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_DN); rtnl_lock(); - if (rc) - goto out; + if (rc) { + netdev_dbg(netdev, + "Setting link down failed rc=%d. Continue anyway\n", rc); + } if (adapter->state == VNIC_OPEN) { /* When we dropped rtnl, ibmvnic_open() got -- 2.26.2
next reply other threads:[~2021-04-20 21:36 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-20 21:35 Dany Madden [this message] 2021-04-20 21:35 ` [PATCH V2 net] ibmvnic: Continue with reset if set link down failed Dany Madden 2021-04-20 21:42 ` Lijun Pan 2021-04-20 21:42 ` Lijun Pan 2021-04-21 6:45 ` Sukadev Bhattiprolu 2021-04-21 6:45 ` Sukadev Bhattiprolu 2021-04-22 5:06 ` Lijun Pan 2021-04-22 5:06 ` Lijun Pan 2021-04-22 6:58 ` Sukadev Bhattiprolu 2021-04-22 6:58 ` Sukadev Bhattiprolu 2021-04-22 7:05 ` Rick Lindsley 2021-04-22 7:05 ` Rick Lindsley 2021-04-22 17:21 ` Michal Suchánek 2021-04-22 17:21 ` Michal Suchánek 2021-04-22 17:38 ` Lijun Pan 2021-04-22 17:38 ` Lijun Pan 2021-04-23 2:26 ` Rick Lindsley 2021-04-23 2:26 ` Rick Lindsley 2021-05-04 19:05 ` Dany Madden 2021-05-04 19:05 ` Dany Madden 2021-04-21 7:54 ` Rick Lindsley 2021-04-21 7:54 ` Rick Lindsley 2021-04-22 5:12 ` Lijun Pan 2021-04-22 5:12 ` Lijun Pan 2021-04-22 7:05 ` Rick Lindsley 2021-04-22 7:05 ` Rick Lindsley 2021-04-22 5:30 ` Lijun Pan 2021-04-22 5:30 ` Lijun Pan 2021-04-22 7:07 ` Rick Lindsley 2021-04-22 7:07 ` Rick Lindsley 2021-04-22 17:01 ` Lijun Pan 2021-04-22 17:01 ` Lijun Pan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210420213517.24171-1-drt@linux.ibm.com \ --to=drt@linux.ibm.com \ --cc=benh@kernel.crashing.org \ --cc=davem@davemloft.net \ --cc=kuba@kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=netdev@vger.kernel.org \ --cc=paulus@samba.org \ --cc=sukadev@linux.ibm.com \ --cc=tlfalcon@linux.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.