aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2010-06-01 07:17:24 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-02 05:21:05 -0400
commit319ba649af30321ea221740833785b46e1fe6af3 (patch)
treecc31c48c61fe42c3c4f7e516647fd19289eb9e5d /drivers/net/sfc/efx.c
parent3bd9303500b1961d15aae783f17075936026ae79 (diff)
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: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 156460527231..0319000379e1 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1886,6 +1886,9 @@ static void efx_reset_work(struct work_struct *data)
1886{ 1886{
1887 struct efx_nic *efx = container_of(data, struct efx_nic, reset_work); 1887 struct efx_nic *efx = container_of(data, struct efx_nic, reset_work);
1888 1888
1889 if (efx->reset_pending == RESET_TYPE_NONE)
1890 return;
1891
1889 /* If we're not RUNNING then don't reset. Leave the reset_pending 1892 /* If we're not RUNNING then don't reset. Leave the reset_pending
1890 * flag set so that efx_pci_probe_main will be retried */ 1893 * flag set so that efx_pci_probe_main will be retried */
1891 if (efx->state != STATE_RUNNING) { 1894 if (efx->state != STATE_RUNNING) {
@@ -2332,6 +2335,9 @@ static int efx_pm_thaw(struct device *dev)
2332 2335
2333 efx->type->resume_wol(efx); 2336 efx->type->resume_wol(efx);
2334 2337
2338 /* Reschedule any quenched resets scheduled during efx_pm_freeze() */
2339 queue_work(reset_workqueue, &efx->reset_work);
2340
2335 return 0; 2341 return 0;
2336} 2342}
2337 2343