summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/selftest.c
diff options
context:
space:
mode:
authorPeter Dunning2017-02-17 16:50:43 +0100
committerDavid S. Miller2017-02-17 21:29:40 +0100
commit9c568fd8844ec3986eb19b0b5d97536243d10d46 (patch)
treec5080f2edd3d4c029e5e38ede183e135ef81787a /drivers/net/ethernet/sfc/selftest.c
parentsfc: forget filters from sw table if hw replies ENOENT on removing them (diff)
downloadkernel-qcow2-linux-9c568fd8844ec3986eb19b0b5d97536243d10d46.tar.gz
kernel-qcow2-linux-9c568fd8844ec3986eb19b0b5d97536243d10d46.tar.xz
kernel-qcow2-linux-9c568fd8844ec3986eb19b0b5d97536243d10d46.zip
sfc: do not device_attach if a reset is pending
efx_start_all can return without initialising queues as a reset is pending. This means that when netif_device_attach is called, the kernel can start sending traffic without having an initialised TX queue to send to. This patch avoids this by not calling netif_device_attach if there is a pending reset. Fixes: e283546c0465 ("sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)") Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/selftest.c')
-rw-r--r--drivers/net/ethernet/sfc/selftest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index cd38b44ae23a..dab286a337a6 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -768,7 +768,7 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
__efx_reconfigure_port(efx);
mutex_unlock(&efx->mac_lock);
- netif_device_attach(efx->net_dev);
+ efx_device_attach_if_not_resetting(efx);
return rc_test;
}