* [PATCH] e100: Fix napi_enable BUG_ON when recovering from EEH error
@ 2009-06-05 20:04 Andre Detsch
2009-06-08 7:42 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andre Detsch @ 2009-06-05 20:04 UTC (permalink / raw)
To: netdev, e1000-devel
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>
---
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 0f9ee13..0c37dd9 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
struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev);
- /* Similar to calling e100_down(), but avoids adapter I/O. */
- e100_close(netdev);
-
- /* Detach; put netif into a state similar to hotplug unplug. */
- napi_enable(&nic->napi);
netif_device_detach(netdev);
+
+ if (state == pci_channel_io_perm_failure)
+ return PCI_ERS_RESULT_DISCONNECT;
+
+ if (netif_running(netdev))
+ e100_down(nic);
pci_disable_device(pdev);
/* Request a slot reset. */
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] e100: Fix napi_enable BUG_ON when recovering from EEH error
2009-06-05 20:04 [PATCH] e100: Fix napi_enable BUG_ON when recovering from EEH error Andre Detsch
@ 2009-06-08 7:42 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-06-08 7:42 UTC (permalink / raw)
To: adetsch; +Cc: e1000-devel, netdev
From: Andre Detsch <adetsch@br.ibm.com>
Date: Fri, 5 Jun 2009 17:04:25 -0300
> 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>
Applied, thank you.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-08 7:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05 20:04 [PATCH] e100: Fix napi_enable BUG_ON when recovering from EEH error Andre Detsch
2009-06-08 7:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).