Commit 319ba649 authored by Steve Hodgson's avatar Steve Hodgson Committed by David S. Miller
Browse files

sfc: Reschedule any resets scheduled inside efx_pm_freeze()

efx_pm_freeze() sets efx->state = STATE_FINI, which means
efx_reset_work() will abort any scheduled resets.

efx_pm_thaw() should reschedule efx_reset_work() again,
since a freeze/thaw will not have reset the hardware.

This bug was spotted by inspection - there is no real world example of
this happening.
Signed-off-by: default avatarBen Hutchings <>
Signed-off-by: default avatarDavid S. Miller <>
parent 3bd93035
......@@ -1886,6 +1886,9 @@ static void efx_reset_work(struct work_struct *data)
struct efx_nic *efx = container_of(data, struct efx_nic, reset_work);
if (efx->reset_pending == RESET_TYPE_NONE)
/* If we're not RUNNING then don't reset. Leave the reset_pending
* flag set so that efx_pci_probe_main will be retried */
if (efx->state != STATE_RUNNING) {
......@@ -2332,6 +2335,9 @@ static int efx_pm_thaw(struct device *dev)
/* Reschedule any quenched resets scheduled during efx_pm_freeze() */
queue_work(reset_workqueue, &efx->reset_work);
return 0;
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