sfc: mark state UNINIT after unregister
authorEdward Cree <ecree@solarflare.com>
Mon, 15 Jun 2015 17:27:54 +0000 (18:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2015 02:55:01 +0000 (19:55 -0700)
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 <jarod@redhat.com>
Reviewed-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/efx.c

index 0c42ed9c9e4c56f7556ecbde4347556ca893550c..67bdaf39dce5aeb3a5469710ddd0a768e7408be0 100644 (file)
@@ -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)