aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2009-04-17 08:21:27 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-20 05:07:27 -0400
commite8d19370734f11e5880bb9ae2125f586e9e5d15c (patch)
tree4b12f7e5e4af51bec3d83ca59f9df8b4b746ced8 /drivers/net
parent2c2f409f32d55d901b28b4e9a06c40e9d899ad25 (diff)
cxgb3: Fix EEH final recovery attempt
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index cbd59fe618a9..7ea48414c6cb 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)
1235 struct port_info *pi = netdev_priv(dev); 1235 struct port_info *pi = netdev_priv(dev);
1236 struct adapter *adapter = pi->adapter; 1236 struct adapter *adapter = pi->adapter;
1237 1237
1238
1239 if (!adapter->open_device_map)
1240 return 0;
1241
1238 /* Stop link fault interrupts */ 1242 /* Stop link fault interrupts */
1239 t3_xgm_intr_disable(adapter, pi->port_id); 1243 t3_xgm_intr_disable(adapter, pi->port_id);
1240 t3_read_reg(adapter, A_XGM_INT_STATUS + pi->mac.offset); 1244 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,
2823 struct adapter *adapter = pci_get_drvdata(pdev); 2827 struct adapter *adapter = pci_get_drvdata(pdev);
2824 int ret; 2828 int ret;
2825 2829
2830 if (state == pci_channel_io_perm_failure)
2831 return PCI_ERS_RESULT_DISCONNECT;
2832
2826 ret = t3_adapter_error(adapter, 0); 2833 ret = t3_adapter_error(adapter, 0);
2827 2834
2828 /* Request a slot reset. */ 2835 /* Request a slot reset. */