On 04/15/2016 09:23 AM, Sumit Saxena wrote: > In OCR path, before calling chip reset calls function megasas_wait_for_outstanding_fusion to check reason > of 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 > managementapplication 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/pendingcommands list of driver and refires same command from IO timeout thread after chip reset > which will again FAULT firmware and evntually causes kill adapter. > > Signed-off-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxx> > --- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html