linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: stop timer in shutdown path
@ 2019-10-24  6:38 Nicholas Piggin
  2019-10-29  1:58 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2019-10-24  6:38 UTC (permalink / raw)
  To: linux-scsi
  Cc: Nicholas Piggin, Quinn Tran, Himanshu Madhani,
	James E.J. Bottomley, Martin K. Petersen, zengxhsh

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.")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
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(+)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3568031c6504..28a40763fabe 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -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;
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: qla2xxx: stop timer in shutdown path
  2019-10-24  6:38 [PATCH] scsi: qla2xxx: stop timer in shutdown path Nicholas Piggin
@ 2019-10-29  1:58 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-10-29  1:58 UTC (permalink / raw)
  To: Nicholas Piggin
  Cc: linux-scsi, Quinn Tran, Himanshu Madhani, James E.J. Bottomley,
	Martin K. Petersen, zengxhsh


Nicholas,

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

Applied to 5.4/scsi-fixes, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-29  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24  6:38 [PATCH] scsi: qla2xxx: stop timer in shutdown path Nicholas Piggin
2019-10-29  1:58 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).