Commit 08d8a817 authored by Jack Wang's avatar Jack Wang Committed by Martin K. Petersen

mvsas: remove SCSI host before detaching from SAS transport

commit cff549e4 ("scsi: proper state checking and module refcount
handling in scsi_device_get") the reference count of scsi device was
changed, which could lead to when rmmod with at least on drive attached,
SCSI error handle will run into infinite loop, and lockup the system.

Fix it by remove scsi host first, this way scsi core will not send
commands down after detaching SAS transport.

This is a follow up fix for Benjamin's fix for pm80xx.

See also:
http://www.spinics.net/lists/linux-scsi/msg90088.htmlSigned-off-by: default avatarJack Wang <jinpu.wang@profitbricks.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4024593d
...@@ -641,9 +641,9 @@ static void mvs_pci_remove(struct pci_dev *pdev) ...@@ -641,9 +641,9 @@ static void mvs_pci_remove(struct pci_dev *pdev)
tasklet_kill(&((struct mvs_prv_info *)sha->lldd_ha)->mv_tasklet); tasklet_kill(&((struct mvs_prv_info *)sha->lldd_ha)->mv_tasklet);
#endif #endif
scsi_remove_host(mvi->shost);
sas_unregister_ha(sha); sas_unregister_ha(sha);
sas_remove_host(mvi->shost); sas_remove_host(mvi->shost);
scsi_remove_host(mvi->shost);
MVS_CHIP_DISP->interrupt_disable(mvi); MVS_CHIP_DISP->interrupt_disable(mvi);
free_irq(mvi->pdev->irq, sha); free_irq(mvi->pdev->irq, sha);
......
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