scsi: mpt3sas: Handle CoreDump state from watchdog thread
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Thu, 26 Dec 2019 11:13:28 +0000 (06:13 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Jan 2020 03:23:16 +0000 (22:23 -0500)
commitfce0aa08792b3ae725395fa25d44507dee0b603b
treeab7afe5a9c8675f190876addae007aa9a106eb91
parente8c2307e6a690db9aaff84153b2857c5c4dfd969
scsi: mpt3sas: Handle CoreDump state from watchdog thread

Watchdog thread polls for IOC state every 1 second.  If it detects that IOC
state is in CoreDump state then it immediately stops the IOs and also
clears the outstanding commands issued to the HBA firmware and then it will
poll for IOC state to be out of CoreDump state and once it detects that IOC
state is changed from CoreDump state to Fault state (or) CoreDumpTOSec
number of seconds are elapsed then it will issue host reset operation and
moves the IOC state to Operational state and resumes the IOs.

Whenever any TM is received from SML then if driver detects the IOC state
is in CoreDump state then it will wait for CoreDump state to be cleared and
will host reset operation.

Link: https://lore.kernel.org/r/20191226111333.26131-6-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/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c