summaryrefslogtreecommitdiff
path: root/drivers/scsi/myrb.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <a.darwish@linutronix.de>2020-11-26 16:29:47 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-12-01 08:03:53 +0300
commit547c0d1aeb76fead5177cc30b95e914b498675bd (patch)
treeda505d52204c78b258f1bb03d01973bc5af56875 /drivers/scsi/myrb.c
parent014aced18aff34d3b3ed3735b094d538b8c9f66e (diff)
downloadlinux-547c0d1aeb76fead5177cc30b95e914b498675bd.tar.xz
scsi: mpt3sas: Remove in_interrupt()
_scsih_fw_event_cleanup_queue() waits for all outstanding firmware events wokrqueue handlers to finish. If in_interrupt() is true, it cancels itself and return early. That in_interrupt() check is ill-defined and does not provide what the name suggests: it does not cover all states in which it is safe to block and call functions like cancel_work_sync(). That check is also not needed: _scsih_fw_event_cleanup_queue() is always invoked from process context. Below is an analysis of its callers: - scsih_remove(), bound to PCI ->remove(), process context - scsih_shutdown(), bound to PCI ->shutdown(), process context - mpt3sas_scsih_clear_outstanding_scsi_tm_commands(), called by => _base_clear_outstanding_commands(), called by =>_base_fault_reset_work(), workqueue => mpt3sas_base_hard_reset_handler(), locks mutex Remove the in_interrupt() check. Change _scsih_fw_event_cleanup_queue() specification to a purely process-context function and mark it with "Context: task, can sleep". Link: https://lore.kernel.org/r/20201126132952.2287996-10-bigeasy@linutronix.de Cc: Sathya Prakash <sathya.prakash@broadcom.com> Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> Cc: <MPT-FusionLinux.pdl@broadcom.com> Reviewed-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/myrb.c')
0 files changed, 0 insertions, 0 deletions