Commit 2d041306 authored by Don Brace's avatar Don Brace Committed by James Bottomley

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: default avatarKevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: default avatarScott Teel <scott.teel@pmcs.com>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 9a4178b7
...@@ -8272,6 +8272,14 @@ static void hpsa_remove_one(struct pci_dev *pdev) ...@@ -8272,6 +8272,14 @@ static void hpsa_remove_one(struct pci_dev *pdev)
destroy_workqueue(h->rescan_ctlr_wq); destroy_workqueue(h->rescan_ctlr_wq);
destroy_workqueue(h->resubmit_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_free_irqs - init_one 4 */
/* includes hpsa_disable_interrupt_mode - pci_init 2 */ /* includes hpsa_disable_interrupt_mode - pci_init 2 */
hpsa_shutdown(pdev); hpsa_shutdown(pdev);
...@@ -8280,8 +8288,6 @@ static void hpsa_remove_one(struct pci_dev *pdev) ...@@ -8280,8 +8288,6 @@ static void hpsa_remove_one(struct pci_dev *pdev)
kfree(h->hba_inquiry_data); /* init_one 10 */ kfree(h->hba_inquiry_data); /* init_one 10 */
h->hba_inquiry_data = NULL; /* 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_ioaccel2_sg_chain_blocks(h);
hpsa_free_performant_mode(h); /* init_one 7 */ hpsa_free_performant_mode(h); /* init_one 7 */
hpsa_free_sg_chain_blocks(h); /* init_one 6 */ hpsa_free_sg_chain_blocks(h); /* init_one 6 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment