diff options
author | Sukadev Bhattiprolu <sukadev@linux.ibm.com> | 2020-11-25 18:04:28 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-16 10:58:26 +0100 |
commit | e68f59be3e68fca421079577031c9ffce3834d9b (patch) | |
tree | 4e7176e93567f1a42672e3fbc7e5f47a80879c28 | |
parent | 0b0d64b126225c07a58619a7c92ea0d5e8617052 (diff) | |
download | linux-stable-e68f59be3e68fca421079577031c9ffce3834d9b.tar.gz linux-stable-e68f59be3e68fca421079577031c9ffce3834d9b.tar.bz2 linux-stable-e68f59be3e68fca421079577031c9ffce3834d9b.zip |
ibmvnic: delay next reset if hard reset fails
[ Upstream commit f15fde9d47b887b406f5e76490d601cfc26643c9 ]
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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index f892cb4a08f4..006670f318bf 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2243,6 +2243,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); |