aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Cree <[email protected]>2015-06-15 18:27:54 +0100
committerDavid S. Miller <[email protected]>2015-06-15 19:55:01 -0700
commitea6bb99ed5860c8906f2ae281da391227f1f027c (patch)
treea5d896a16bf435707c876cc2cc7a616931024483
parent24029a3603cfa633e8bc2b3fb3e48e76c497831d (diff)
sfc: mark state UNINIT after unregister
Without this change, modprobe -r sfc hits the BUG_ON() in efx_pci_remove_main(). Fixes: e7fef9b45ae1 ("sfc: add sysfs entry to control MCDI tracing") Reported-by: Jarod Wilson <[email protected]> Reviewed-by: Jarod Wilson <[email protected]> Signed-off-by: Edward Cree <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/sfc/efx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 0c42ed9c9e4c..67bdaf39dce5 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2920,6 +2920,7 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
efx_dissociate(efx);
dev_close(efx->net_dev);
efx_disable_interrupts(efx);
+ efx->state = STATE_UNINIT;
rtnl_unlock();
if (efx->type->sriov_fini)