diff options
author | Don Brace <don.brace@pmcs.com> | 2015-07-18 18:13:15 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-08-27 01:29:49 +0200 |
commit | 2d041306b669e281427de7dd398e74335c9f5042 (patch) | |
tree | ca83005bb8ef66ebe2139e5a6880ba7a17d7bc56 /drivers | |
parent | hpsa: fix issues with multilun devices (diff) | |
download | linux-2d041306b669e281427de7dd398e74335c9f5042.tar.xz linux-2d041306b669e281427de7dd398e74335c9f5042.zip |
hpsa: fix rmmod issues
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>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/hpsa.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 3f1c2a88b204..40669f8dd0df 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -8272,6 +8272,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); @@ -8280,8 +8288,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 */ |