]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mpt3sas: Fix panic when aer correct error occurred
authorKefeng Wang <wangkefeng.wang@huawei.com>
Tue, 12 Jul 2016 09:43:25 +0000 (17:43 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:24:04 +0000 (13:24 -0800)
Orabug: 25535122

The _scsih_pci_mmio_enabled called if scsih_pci_error_detected returns
PCI_ERS_RESULT_CAN_RECOVER, at this point, read/write to the device
still works, no need to reset slot.

Or the mpt3sas_base_map_resources in scsih_pci_slot_reset will fail,
and iounamp ioc->chip, then we will meet issue when read ioc->chip
in mpt3sas_base_get_iocstate from _base_fault_reset_work.

Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Chaitra P B <chaitra.basappa@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 83c3d3400c87d6d943bf97fce4b30f4fe6870253)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c

index 6c45e137a31ea0ca383a56948e85ee9f84d79d76..4cb79902e7a8fe38565ac61918cf2cd143888426 100644 (file)
@@ -9035,8 +9035,11 @@ scsih_pci_mmio_enabled(struct pci_dev *pdev)
 
        /* TODO - dump whatever for debugging purposes */
 
-       /* Request a slot reset. */
-       return PCI_ERS_RESULT_NEED_RESET;
+       /* This called only if scsih_pci_error_detected returns
+        * PCI_ERS_RESULT_CAN_RECOVER. Read/write to the device still
+        * works, no need to reset slot.
+        */
+       return PCI_ERS_RESULT_RECOVERED;
 }
 
 /*