From: Kevin Barnett Date: Thu, 10 Aug 2017 18:47:03 +0000 (-0500) Subject: scsi: smartpqi: update kexec and power down support X-Git-Tag: v4.1.12-117.0_27200813_3~180 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0f33fc194055e4d46bf0ece2633c185a1bb0997c;p=users%2Fjedix%2Flinux-maple.git scsi: smartpqi: update kexec and power down support 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 Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen (cherry picked from commit b6d478119edeaca964b46796fd26893b81f8a561) Orabug: 26943380 Signed-off-by: Kirtikar Kashyap Reviewed-by: Jack Vogel --- diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index dab4e524a208..faa3b631307f 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6738,6 +6738,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;