scsi: smartpqi: update kexec and power down support
authorKevin Barnett <kevin.barnett@microsemi.com>
Thu, 10 Aug 2017 18:47:03 +0000 (13:47 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Aug 2017 23:58:26 +0000 (19:58 -0400)
Add PQI reset to driver shutdown callback to work around controller bug.

During an 1.) OS shutdown or 2.) kexec outside of a kdump, the Linux
kernel will clear BME on our controller.

If BME is cleared during a controller/host PCIe transfer, the controller
will lock up.

So we perform a PQI reset in the driver's shutdown callback function to
eliminate the possibility of a controller/host PCIe transfer being
active when the kernel clears BME immediately after calling the driver's
shutdown callback.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi_init.c

index 70b1f97daee8422875c7a05ca2d2a2f2bf2a5788..afd3eed8304426c22b5bb68643b221f29f78f759 100644 (file)
@@ -6700,6 +6700,7 @@ static void pqi_shutdown(struct pci_dev *pci_dev)
         * storage.
         */
        rc = pqi_flush_cache(ctrl_info, SHUTDOWN);
+       pqi_reset(ctrl_info);
        if (rc == 0)
                return;