]> www.infradead.org Git - users/jedix/linux-maple.git/commit
megaraid_sas: call ISR function to clean up pending replies in OCR path
authorSumit Saxena <sumit.saxena@broadcom.com>
Fri, 15 Apr 2016 07:23:31 +0000 (00:23 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 28 Feb 2017 04:40:01 +0000 (20:40 -0800)
commit3f49a9997ab9fc5ea134d6d3f46f8535e5d0c1e0
tree19bfe1e7d23f6189fae011c4d937aebb62280375
parentff29126cac843704c4c4fd53cd53f4d36cdfede3
megaraid_sas: call ISR function to clean up pending replies in OCR path

Orabug: 25568930

In OCR path, before calling chip reset calls function
megasas_wait_for_outstanding_fusion to check reason for OCR. In case of
firmware FAULT initiated OCR and DCMD timeout initiated timeout, driver
will clear any outstanding reply (yet to be processed by driver) in
reply queues before going for chip reset. This code is added to handle a
scenario when IO timeout initiated adapter reset and management
application initiated adapter reset (by sending command to FAULT
firmware) happens simultaneously since adapter reset function is
safe-guarded by reset_mutex so only thread will be doing controller
reset. Consider IO timeout thread gets mutex and proceeds with adapter
reset process after disabling interrupts and by the time management
application has fired command to firmware to do adapter reset and the
same command is completed by firmware but since interrupts are disabled,
driver will not get completion and the same command will be in
outstanding/pending commands list of driver and refires same command
from IO timeout thread after chip reset which will again FAULT firmware
and eventually causes kill adapter.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 64d0b8e4a6f7e9a3c366c2df93ec1f003d180ca3)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c