scsi: mpt3sas: Cancel the running work during host reset
authorSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Thu, 30 Jul 2020 08:03:45 +0000 (13:33 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 21 Aug 2020 01:41:50 +0000 (21:41 -0400)
commit9e73ed2e4cf51878ad2e5c5cff6146844f5960b7
treeb4fd8a82297f39b3036129bc7f4dda5fe8d6db0f
parentaf6ec1eee5ed680df0b5e0e49aa6b2673ef6e237
scsi: mpt3sas: Cancel the running work during host reset

It is not recommended to issue back-to-back host reset without any delay.
However, if someone issues back-to-back host reset then we observe that
target devices get unregistered and re-register with SML.  And if OS drive
is behind the HBA when it gets unregistered, then file-system goes into
read-only mode.

Normally during host reset, driver marks accessible target devices as
responding and triggers the event MPT3SAS_REMOVE_UNRESPONDING_DEVICES to
remove any non-responding devices through FW worker thread. While
processing this event, driver unregisters the non-responding devices and
clears the responding flag for all the devices.

Currently, during host reset, driver is cancelling only those Firmware
event works which are pending in Firmware event workqueue. It is not
cancelling work which is currently running. Change the driver to cancel all
events.

Link: https://lore.kernel.org/r/1596096229-3341-4-git-send-email-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c