From: Don Brace <don.brace@pmcs.com>
To: scott.teel@pmcs.com, Kevin.Barnett@pmcs.com,
james.bottomley@parallels.com, hch@infradead.org,
Justin.Lindley@pmcs.com, elliott@hp.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 11/11] hpsa: fix rmmod issues
Date: Sat, 18 Jul 2015 11:13:15 -0500 [thread overview]
Message-ID: <20150718161315.31955.98302.stgit@brunhilda> (raw)
In-Reply-To: <20150718160245.31955.16794.stgit@brunhilda>
The driver is calling hpsa_shutdown before calling scsi_remove_host.
hpsa_shutdown is disabling interrupts.
scsi_remove_host can trigger I/O operations, such as
SYNCHRONIZE CACHE when multipath is enabled which hang the system.
Call scsi_remove_host before calling hpsa_shutdown.
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
---
drivers/scsi/hpsa.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a3077e9..0f8acfb 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -8269,6 +8269,14 @@ static void hpsa_remove_one(struct pci_dev *pdev)
destroy_workqueue(h->rescan_ctlr_wq);
destroy_workqueue(h->resubmit_wq);
+ /*
+ * Call before disabling interrupts.
+ * scsi_remove_host can trigger I/O operations especially
+ * when multipath is enabled. There can be SYNCHRONIZE CACHE
+ * operations which cannot complete and will hang the system.
+ */
+ if (h->scsi_host)
+ scsi_remove_host(h->scsi_host); /* init_one 8 */
/* includes hpsa_free_irqs - init_one 4 */
/* includes hpsa_disable_interrupt_mode - pci_init 2 */
hpsa_shutdown(pdev);
@@ -8277,8 +8285,6 @@ static void hpsa_remove_one(struct pci_dev *pdev)
kfree(h->hba_inquiry_data); /* init_one 10 */
h->hba_inquiry_data = NULL; /* init_one 10 */
- if (h->scsi_host)
- scsi_remove_host(h->scsi_host); /* init_one 8 */
hpsa_free_ioaccel2_sg_chain_blocks(h);
hpsa_free_performant_mode(h); /* init_one 7 */
hpsa_free_sg_chain_blocks(h); /* init_one 6 */
next prev parent reply other threads:[~2015-07-18 16:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 16:12 [PATCH 00/11] hpsa updates Don Brace
2015-07-18 16:12 ` [PATCH 01/11] hpsa: Correct double unlock of mutex Don Brace
2015-07-22 15:16 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 02/11] hpsa: correct decode sense data Don Brace
2015-07-22 15:16 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 03/11] hpsa: correct static checker warnings on driver init cleanup Don Brace
2015-07-22 15:16 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 04/11] hpsa: add PMC to copyright Don Brace
2015-07-18 16:12 ` [PATCH 05/11] hpsa: add sysfs entry path_info to show box and bay information Don Brace
2015-07-22 15:18 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 06/11] hpsa: cleanup update scsi devices Don Brace
2015-07-22 15:19 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 07/11] hpsa: add in new controllers Don Brace
2015-07-22 15:19 ` Tomas Henzl
2015-07-18 16:12 ` [PATCH 08/11] Change how controllers in mixed mode are handled Don Brace
2015-07-18 16:13 ` [PATCH 09/11] hpsa: add in new offline mode Don Brace
2015-07-22 15:19 ` Tomas Henzl
2015-07-18 16:13 ` [PATCH 10/11] hpsa: fix issues with multilun devices Don Brace
2015-07-22 15:19 ` Tomas Henzl
2015-07-18 16:13 ` Don Brace [this message]
2015-07-22 15:20 ` [PATCH 11/11] hpsa: fix rmmod issues Tomas Henzl
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=20150718161315.31955.98302.stgit@brunhilda \
--to=don.brace@pmcs.com \
--cc=Justin.Lindley@pmcs.com \
--cc=Kevin.Barnett@pmcs.com \
--cc=elliott@hp.com \
--cc=hch@infradead.org \
--cc=james.bottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=scott.teel@pmcs.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