netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.30 4/4] cxgb3: Fix EEH final recovery attempt
@ 2009-04-17 22:21 Divy Le Ray
  2009-04-20  9:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Divy Le Ray @ 2009-04-17 22:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>

EEH attempts to recover up 6 times.
The last attempt leaves all the ports and adapter down.hen
The driver is then unloaded, bringing the adapter down again
unconditionally. The unload will hang.
Check if the adapter is already down before trying to bring it down again.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

 drivers/net/cxgb3/cxgb3_main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index cbd59fe..7ea4841 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1235,6 +1235,10 @@ static int cxgb_close(struct net_device *dev)
 	struct port_info *pi = netdev_priv(dev);
 	struct adapter *adapter = pi->adapter;
 
+	
+	if (!adapter->open_device_map)
+		return 0;
+
 	/* Stop link fault interrupts */
 	t3_xgm_intr_disable(adapter, pi->port_id);
 	t3_read_reg(adapter, A_XGM_INT_STATUS + pi->mac.offset);
@@ -2823,6 +2827,9 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
 	struct adapter *adapter = pci_get_drvdata(pdev);
 	int ret;
 
+	if (state == pci_channel_io_perm_failure)
+		return PCI_ERS_RESULT_DISCONNECT;
+
 	ret = t3_adapter_error(adapter, 0);
 
 	/* Request a slot reset. */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.30 4/4] cxgb3: Fix EEH final recovery attempt
  2009-04-17 22:21 [PATCH 2.6.30 4/4] cxgb3: Fix EEH final recovery attempt Divy Le Ray
@ 2009-04-20  9:08 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-04-20  9:08 UTC (permalink / raw)
  To: divy; +Cc: netdev, linux-kernel, swise

From: Divy Le Ray <divy@chelsio.com>
Date: Fri, 17 Apr 2009 15:21:27 -0700

> EEH attempts to recover up 6 times.
> The last attempt leaves all the ports and adapter down.hen
> The driver is then unloaded, bringing the adapter down again
> unconditionally. The unload will hang.
> Check if the adapter is already down before trying to bring it down again.
> 
> Signed-off-by: Divy Le Ray <divy@chelsio.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-20  9:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17 22:21 [PATCH 2.6.30 4/4] cxgb3: Fix EEH final recovery attempt Divy Le Ray
2009-04-20  9:08 ` 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).