Skip to contentSkip to conversation

mpt3sas: a shutdown fix

PATCH In review Tomas Henzl 2 participants 3 messages Jun 24, 2021 – Jul 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpt3sas: a shutdown fix

A driver doesn't have to to free allocated memory when in shutdown it is enough when it quiesces itself. This patch hardens the driver when additional commands are queued after .shutdown has been called.

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -1
index dc2aaaf645d3..1885d13005cb 100644
@@ -11293,7 +11293,7 @@ scsih_shutdown(struct pci_dev *pdev)
 
 	_scsih_ir_shutdown(ioc);
 	_scsih_nvme_shutdown(ioc);
-	mpt3sas_base_detach(ioc);
+	mpt3sas_base_stop_watchdog(ioc);
 }
 
 
Signature · 1 line
2.31.1
maintainer
#1 lore raw

Tomas,

During shutdown, we have to move the Controller state from Operational state to Ready state by issuing MUR (message unit reset). otherwise we may observe firmware faults when it sends some events or interrupts during reboot.

Shall I post the new patch with the proper fix?

Thanks,
Sreekanth

Quoted 26 lines · Tomas Henzl

A driver doesn't have to to free allocated memory when in shutdown it is enough when it quiesces itself. This patch hardens the driver when additional commands are queued after .shutdown has been called.

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -2
index dc2aaaf645d3..1885d13005cb 100644
@@ -11293,7 +11293,7 @@ scsih_shutdown(struct pci_dev *pdev)
 
        _scsih_ir_shutdown(ioc);
        _scsih_nvme_shutdown(ioc);
-       mpt3sas_base_detach(ioc);
+       mpt3sas_base_stop_watchdog(ioc);
 }
 
 
--

2.31.1

maintainer
#2 lore raw
Quoted 9 lines · Sreekanth Reddy

Tomas,

During shutdown, we have to move the Controller state from Operational state to Ready state by issuing MUR (message unit reset). otherwise we may observe firmware faults when it sends some events or interrupts during reboot.

Shall I post the new patch with the proper fix?

Tomas,

Can you please try with below patch which I have posted today,

[PATCH] mpt3sas: Move IOC state to Ready state during shutdown

Thanks,
Sreekanth

Quoted 32 lines

Thanks,
Sreekanth

Quoted 26 lines · Tomas Henzl

A driver doesn't have to to free allocated memory when in shutdown it is enough when it quiesces itself. This patch hardens the driver when additional commands are queued after .shutdown has been called.

---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -2
index dc2aaaf645d3..1885d13005cb 100644
@@ -11293,7 +11293,7 @@ scsih_shutdown(struct pci_dev *pdev)
 
        _scsih_ir_shutdown(ioc);
        _scsih_nvme_shutdown(ioc);
-       mpt3sas_base_detach(ioc);
+       mpt3sas_base_stop_watchdog(ioc);
 }
 
 
--

2.31.1