]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mrsas: if controller reset is in progress, refrain from firing DCMDs to
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>
Fri, 21 Jan 2022 09:24:37 +0000 (14:54 +0530)
committerWarner Losh <imp@FreeBSD.org>
Wed, 6 Apr 2022 17:46:00 +0000 (11:46 -0600)
commitc872d65b55aa3bf6c030276eb0c7933015b20801
tree95e98ecd5c9af16f783b26c3fffd794b392d8a66
parentcf523b815c780f741b5f4b7d1cd1258d0118ad1f
mrsas: if controller reset is in progress, refrain from firing DCMDs to
firmware in shutdown

If controller reset is in progress, at same time if system shutdown is
issued then corresponding shutdown function in driver will be invoked
where driver is waiting 15 seconds to complete the controller reset.

If the reset is not complteted within that time frame driver will go
ahead and fire cache flush and shutdown DCMDs which will end up
accessing the the queues which are not initialized due to undergoing
reset leads to FMU error in firmware.

Fix:
In shutdown function, if controller reset is not finished within 15
seconds than driver will return to the OS without firing any DCMDs.

Approved by: re@ (gjb)
Reviewed by: imp
PR: 261375

(cherry picked from commit 79c4c4be9618470711480f46ef2cd3a15c00cdd2)
(cherry picked from commit 09e161a29ee5b0e52494c861f451de35b286e327)
sys/dev/mrsas/mrsas.c