LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dany Madden <drt@linux.ibm.com>
To: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, sukadev@linux.ibm.com, ljp@linux.ibm.com
Subject: [PATCH net v3 5/9] ibmvnic: delay next reset if hard reset fails
Date: Wed, 25 Nov 2020 18:04:28 -0600	[thread overview]
Message-ID: <20201126000432.29897-6-drt@linux.ibm.com> (raw)
In-Reply-To: <20201126000432.29897-1-drt@linux.ibm.com>

From: Sukadev Bhattiprolu <sukadev@linux.ibm.com>

If auto-priority failover is enabled, the backing device needs time
to settle if hard resetting fails for any reason. Add a delay of 60
seconds before retrying the hard-reset.

Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index ff474a790181..e2f9b0e9dea8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2242,6 +2242,14 @@ static void __ibmvnic_reset(struct work_struct *work)
 				rc = do_hard_reset(adapter, rwi, reset_state);
 				rtnl_unlock();
 			}
+			if (rc) {
+				/* give backing device time to settle down */
+				netdev_dbg(adapter->netdev,
+					   "[S:%d] Hard reset failed, waiting 60 secs\n",
+					   adapter->state);
+				set_current_state(TASK_UNINTERRUPTIBLE);
+				schedule_timeout(60 * HZ);
+			}
 		} else if (!(rwi->reset_reason == VNIC_RESET_FATAL &&
 				adapter->from_passive_init)) {
 			rc = do_reset(adapter, rwi, reset_state);
-- 
2.26.2


  parent reply	other threads:[~2020-11-26  0:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  0:04 [PATCH net v3 0/9] ibmvnic: assorted bug fixes Dany Madden
2020-11-26  0:04 ` [PATCH net v3 1/9] ibmvnic: handle inconsistent login with reset Dany Madden
2020-11-26  0:04 ` [PATCH net v3 2/9] ibmvnic: stop free_all_rwi on failed reset Dany Madden
2020-11-26  0:04 ` [PATCH net v3 3/9] ibmvnic: avoid memset null scrq msgs Dany Madden
2020-11-26  0:04 ` [PATCH net v3 4/9] ibmvnic: restore adapter state on failed reset Dany Madden
2020-11-26  0:04 ` Dany Madden [this message]
2020-11-26  0:04 ` [PATCH net v3 6/9] ibmvnic: track pending login Dany Madden
2020-11-26  0:04 ` [PATCH net v3 7/9] ibmvnic: send_login should check for crq errors Dany Madden
2020-11-26  0:04 ` [PATCH net v3 8/9] ibmvnic: no reset timeout for 5 seconds after reset Dany Madden
2020-11-26  0:04 ` [PATCH net v3 9/9] ibmvnic: reduce wait for completion time Dany Madden
2020-11-28 21:32 ` [PATCH net v3 0/9] ibmvnic: assorted bug fixes Jakub Kicinski

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=20201126000432.29897-6-drt@linux.ibm.com \
    --to=drt@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ljp@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=sukadev@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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox