aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.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_base.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_base.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 1f22a764927a..57bcd5c9dcff 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1311,6 +1311,9 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
1311 printk(MPT2SAS_INFO_FMT "ioport(0x%016llx), size(%d)\n", 1311 printk(MPT2SAS_INFO_FMT "ioport(0x%016llx), size(%d)\n",
1312 ioc->name, (unsigned long long)pio_chip, pio_sz); 1312 ioc->name, (unsigned long long)pio_chip, pio_sz);
1313 1313
1314 /* Save PCI configuration state for recovery from PCI AER/EEH errors */
1315 pci_save_state(pdev);
1316
1314 return 0; 1317 return 0;
1315 1318
1316 out_fail: 1319 out_fail:
@@ -3407,6 +3410,9 @@ _base_make_ioc_ready(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
3407 dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name, 3410 dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
3408 __func__)); 3411 __func__));
3409 3412
3413 if (ioc->pci_error_recovery)
3414 return 0;
3415
3410 ioc_state = mpt2sas_base_get_iocstate(ioc, 0); 3416 ioc_state = mpt2sas_base_get_iocstate(ioc, 0);
3411 dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: ioc_state(0x%08x)\n", 3417 dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: ioc_state(0x%08x)\n",
3412 ioc->name, __func__, ioc_state)); 3418 ioc->name, __func__, ioc_state));
@@ -3869,6 +3875,13 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
3869 dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, 3875 dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
3870 __func__)); 3876 __func__));
3871 3877
3878 if (ioc->pci_error_recovery) {
3879 printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n",
3880 ioc->name, __func__);
3881 r = 0;
3882 goto out;
3883 }
3884
3872 if (mpt2sas_fwfault_debug) 3885 if (mpt2sas_fwfault_debug)
3873 mpt2sas_halt_firmware(ioc); 3886 mpt2sas_halt_firmware(ioc);
3874 3887