Commit f15fde9d authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by Jakub Kicinski

ibmvnic: delay next reset if hard reset fails

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: 2770a798 ("ibmvnic: Introduce hard reset recovery")
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0cb4bc66
......@@ -2241,6 +2241,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment