scsi: mpi3mr: Fix deadlock while canceling the fw event
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Thu, 10 Feb 2022 09:58:09 +0000 (15:28 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 11 Feb 2022 22:40:03 +0000 (17:40 -0500)
commit580e6742205efe6b0bfa5a6a6079f509d99168e0
tree5f067cd5b7ff883e11904ec624c5f06a4163d60b
parent23406e4d1f1e4653ec16b546d9480268ef284634
scsi: mpi3mr: Fix deadlock while canceling the fw event

During controller reset, the driver tries to flush all the pending firmware
event works from worker queue that are queued prior to the reset. However,
if any work is waiting for device addition/removal operation to be
completed at the SML, then a deadlock is observed. This is due to the
controller reset waiting for the device addition/removal to be completed
and the device/addition removal is waiting for the controller reset to be
completed.

To limit this deadlock, continue with the controller reset handling without
canceling the work which is waiting for device addition/removal operation
to complete at SML.

Link: https://lore.kernel.org/r/20220210095817.22828-2-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr.h
drivers/scsi/mpi3mr/mpi3mr_fw.c
drivers/scsi/mpi3mr/mpi3mr_os.c