[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>
This commit is contained in:
committed by
James Bottomley
parent
a2f1d139df
commit
3cb5469a2a
@@ -1311,6 +1311,9 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
|
||||
printk(MPT2SAS_INFO_FMT "ioport(0x%016llx), size(%d)\n",
|
||||
ioc->name, (unsigned long long)pio_chip, pio_sz);
|
||||
|
||||
/* Save PCI configuration state for recovery from PCI AER/EEH errors */
|
||||
pci_save_state(pdev);
|
||||
|
||||
return 0;
|
||||
|
||||
out_fail:
|
||||
@@ -3407,6 +3410,9 @@ _base_make_ioc_ready(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
|
||||
dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
|
||||
__func__));
|
||||
|
||||
if (ioc->pci_error_recovery)
|
||||
return 0;
|
||||
|
||||
ioc_state = mpt2sas_base_get_iocstate(ioc, 0);
|
||||
dhsprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: ioc_state(0x%08x)\n",
|
||||
ioc->name, __func__, ioc_state));
|
||||
@@ -3869,6 +3875,13 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,
|
||||
dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name,
|
||||
__func__));
|
||||
|
||||
if (ioc->pci_error_recovery) {
|
||||
printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n",
|
||||
ioc->name, __func__);
|
||||
r = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (mpt2sas_fwfault_debug)
|
||||
mpt2sas_halt_firmware(ioc);
|
||||
|
||||
|
Reference in New Issue
Block a user