Skip to contentSkip to conversation

scsi: qla2xxx: stop timer in shutdown path

PATCH Applied Nicholas Piggin 2 participants 2 messages Oct 24, 2019 – Oct 29, 2019

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

PATCH 1/1 scsi: qla2xxx: stop timer in shutdown path

In shutdown/reboot paths, the timer is not stopped:

qla2x00_shutdown
pci_device_shutdown
device_shutdown
kernel_restart_prepare
kernel_restart
sys_reboot

This causes lockups (on powerpc) when firmware config space access calls are interrupted by smp_send_stop later in reboot.

Fixes e30d1756480dc ("[SCSI] qla2xxx: Addition of shutdown callback handler.")

---
The Fixes: tag is not exactly fixing the commit, presumably the timer was still left running before then too. However it gives a handle for backports: if you care about cleaning up resources on shutdown, then you need that patch, so you'll notice this one too.

Thanks,
Nick

 drivers/scsi/qla2xxx/qla_os.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/scsi/qla2xxx/qla_os.c +4 -0
index 3568031c6504..28a40763fabe 100644
@@ -3531,6 +3531,10 @@ qla2x00_shutdown(struct pci_dev *pdev)
 		qla2x00_try_to_stop_firmware(vha);
 	}
 
+	/* Disable timer */
+	if (vha->timer_active)
+		qla2x00_stop_timer(vha);
+
 	/* Turn adapter off line */
 	vha->flags.online = 0;
 
Signature · 1 line
2.23.0
#1 lore raw

Nicholas,

Quoted 1 line

In shutdown/reboot paths, the timer is not stopped:

Applied to 5.4/scsi-fixes, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering