linux/drivers/scsi/hisi_sas
Luo Jiaxing 6834ec8b23 scsi: hisi_sas: Flush workqueue in hisi_sas_v3_remove()
If the controller reset occurs at the same time as driver removal, it may
be possible that the interrupts have been released prior to the host
softreset, and calling pci_irq_vector() there causes a WARN:

WARNING: CPU: 37 PID: 1542 /pci/msi.c:1275 pci_irq_vector+0xc0/0xd0
Call trace:
pci_irq_vector+0xc0/0xd0
disable_host_v3_hw+0x58/0x5b0 [hisi_sas_v3_hw]
soft_reset_v3_hw+0x40/0xc0 [hisi_sas_v3_hw]
hisi_sas_controller_reset+0x150/0x260 [hisi_sas_main]
hisi_sas_rst_work_handler+0x3c/0x58 [hisi_sas_main]

To fix, flush the driver workqueue prior to releasing the interrupts to
ensure any resets have been completed.

Link: https://lore.kernel.org/r/1611659068-131975-5-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-01-26 23:02:11 -05:00
..
hisi_sas_main.c scsi: hisi_sas: Enable debugfs support by default 2021-01-26 23:02:11 -05:00
hisi_sas_v1_hw.c scsi: hisi_sas: Switch back to original libsas event notifiers 2021-01-22 21:31:09 -05:00
hisi_sas_v2_hw.c scsi: hisi_sas: Remove deferred probe check in hisi_sas_v2_probe() 2021-01-26 23:02:11 -05:00
hisi_sas_v3_hw.c scsi: hisi_sas: Flush workqueue in hisi_sas_v3_remove() 2021-01-26 23:02:11 -05:00
hisi_sas.h scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers 2021-01-22 21:31:08 -05:00
Kconfig scsi: hisi_sas: Enable debugfs support by default 2021-01-26 23:02:11 -05:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00