diff options
author | Andre Detsch <adetsch@br.ibm.com> | 2009-06-08 03:42:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-08 03:42:30 -0400 |
commit | ef681ce1e8b3e63317cd724c200b2fd39286c005 (patch) | |
tree | 95251ac5c80b2285fe6dc375e9f4ccbd3669c389 /drivers | |
parent | 1d0ebfe7c9621d43804e9ce9f2b898541a7d9652 (diff) |
e100: Fix napi_enable BUG_ON when recovering from EEH error
BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit
during e100 EEH recovery. The problem source was a napi_enable
call being made during e100_io_error_detected. Napi should remain
disabled after e100_down, and only be reenabled when the interface
is recovered.
This patch also updates e100_io_error_detected in order to make
it similar to the current versions of the error_detected callback
in drivers such as e1000e and ixgbe.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e100.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 0f9ee134855..0c37dd97fa0 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2822,12 +2822,13 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel | |||
2822 | struct net_device *netdev = pci_get_drvdata(pdev); | 2822 | struct net_device *netdev = pci_get_drvdata(pdev); |
2823 | struct nic *nic = netdev_priv(netdev); | 2823 | struct nic *nic = netdev_priv(netdev); |
2824 | 2824 | ||
2825 | /* Similar to calling e100_down(), but avoids adapter I/O. */ | ||
2826 | e100_close(netdev); | ||
2827 | |||
2828 | /* Detach; put netif into a state similar to hotplug unplug. */ | ||
2829 | napi_enable(&nic->napi); | ||
2830 | netif_device_detach(netdev); | 2825 | netif_device_detach(netdev); |
2826 | |||
2827 | if (state == pci_channel_io_perm_failure) | ||
2828 | return PCI_ERS_RESULT_DISCONNECT; | ||
2829 | |||
2830 | if (netif_running(netdev)) | ||
2831 | e100_down(nic); | ||
2831 | pci_disable_device(pdev); | 2832 | pci_disable_device(pdev); |
2832 | 2833 | ||
2833 | /* Request a slot reset. */ | 2834 | /* Request a slot reset. */ |