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: 2770a7984d ("ibmvnic: Introduce hard reset recovery")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Sukadev Bhattiprolu 2020-11-25 18:04:28 -06:00 коммит произвёл Jakub Kicinski
Родитель 0cb4bc66ba
Коммит f15fde9d47
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -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);