[PATCH] scsi: smartpqi: put controller in SIS mode at shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since commit 162d7753fce9 ("scsi: smartpqi: ensure controller is in SIS
mode at init"), the driver is able to work even if the controller is in
PQI mode at startup. This made it possible to keep using the controller
across a kexec.

But kernels built before that patch still expect the controller to be in
SIS mode at startup. They will fail when kexec'd. To handle that case,
this patch reverts the controller to SIS mode during the ->shutdown()
callback.

Signed-off-by: Vincent Minet <v.minet@xxxxxxxxxx>
---
 drivers/scsi/smartpqi/smartpqi_init.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index b2880c7709e6..5e898dd9ae2b 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6699,7 +6699,12 @@ static void pqi_shutdown(struct pci_dev *pci_dev)
 	 * storage.
 	 */
 	rc = pqi_flush_cache(ctrl_info, SHUTDOWN);
-	pqi_reset(ctrl_info);
+
+	if (ctrl_info->pqi_mode_enabled)
+		pqi_revert_to_sis_mode(ctrl_info);
+	else
+		pqi_reset(ctrl_info);
+
 	if (rc == 0)
 		return;
 
-- 
2.15.0




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux