public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Quinn Tran <qutran@marvell.com>,
	Himanshu Madhani <hmadhani@marvell.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	zengxhsh@cn.ibm.com
Subject: [PATCH] scsi: qla2xxx: stop timer in shutdown path
Date: Thu, 24 Oct 2019 16:38:04 +1000	[thread overview]
Message-ID: <20191024063804.14538-1-npiggin@gmail.com> (raw)

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


             reply	other threads:[~2019-10-24  6:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  6:38 Nicholas Piggin [this message]
2019-10-29  1:58 ` [PATCH] scsi: qla2xxx: stop timer in shutdown path Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024063804.14538-1-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=hmadhani@marvell.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=qutran@marvell.com \
    --cc=zengxhsh@cn.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox