aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_transport.c
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2010-07-08 16:44:34 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:03 -0400
commit3cb5469a2ab4b87a7c63dd218fdc1625bc73eccc (patch)
tree65b46a61abf39654b8a367ff40c1ec880ad606fa /drivers/scsi/mpt2sas/mpt2sas_transport.c
parenta2f1d139df42df6f3a2641591dea9e068b68f68c (diff)
[SCSI] mpt2sas: driver fails to recover from injected PCIe bus errors
fixes surrounding PCIe enhanced error handling: (1) We need to reject all request generated internaly inside the driver as well as request arriving from the scsi mid layer when PCIe EEH is active. The fix is to add a per adapter flag called pci_error_recovery which is checked thru out the driver when request are generated. (2) We don't need to call the pci_driver->remove directly from the PCIe callbacks becuase its already called from the PCIe EEH code. In its place we are shutting down the watchdog timer, and flushing back all pending IO. (3) We need to save and restore the pci state across PCIe EEH handling. Signed-off-by: Eric Moore <eric.moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_transport.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_transport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c
index f29ea5e78bb3..b55c6dc07470 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_transport.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c
@@ -140,7 +140,7 @@ _transport_set_identify(struct MPT2SAS_ADAPTER *ioc, u16 handle,
140 u32 device_info; 140 u32 device_info;
141 u32 ioc_status; 141 u32 ioc_status;
142 142
143 if (ioc->shost_recovery) { 143 if (ioc->shost_recovery || ioc->pci_error_recovery) {
144 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n", 144 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n",
145 __func__, ioc->name); 145 __func__, ioc->name);
146 return -EFAULT; 146 return -EFAULT;
@@ -302,7 +302,7 @@ _transport_expander_report_manufacture(struct MPT2SAS_ADAPTER *ioc,
302 u64 *sas_address_le; 302 u64 *sas_address_le;
303 u16 wait_state_count; 303 u16 wait_state_count;
304 304
305 if (ioc->shost_recovery) { 305 if (ioc->shost_recovery || ioc->pci_error_recovery) {
306 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n", 306 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n",
307 __func__, ioc->name); 307 __func__, ioc->name);
308 return -EFAULT; 308 return -EFAULT;
@@ -894,7 +894,7 @@ mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc,
894 struct _sas_node *sas_node; 894 struct _sas_node *sas_node;
895 struct _sas_phy *mpt2sas_phy; 895 struct _sas_phy *mpt2sas_phy;
896 896
897 if (ioc->shost_recovery) 897 if (ioc->shost_recovery || ioc->pci_error_recovery)
898 return; 898 return;
899 899
900 spin_lock_irqsave(&ioc->sas_node_lock, flags); 900 spin_lock_irqsave(&ioc->sas_node_lock, flags);
@@ -997,7 +997,7 @@ _transport_get_expander_phy_error_log(struct MPT2SAS_ADAPTER *ioc,
997 u64 *sas_address_le; 997 u64 *sas_address_le;
998 u16 wait_state_count; 998 u16 wait_state_count;
999 999
1000 if (ioc->shost_recovery) { 1000 if (ioc->shost_recovery || ioc->pci_error_recovery) {
1001 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n", 1001 printk(MPT2SAS_INFO_FMT "%s: host reset in progress!\n",
1002 __func__, ioc->name); 1002 __func__, ioc->name);
1003 return -EFAULT; 1003 return -EFAULT;