aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mrsas/mrsas.c
diff options
context:
space:
mode:
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>2022-01-21 09:24:37 +0000
committerWarner Losh <imp@FreeBSD.org>2022-04-05 14:38:15 +0000
commit79c4c4be9618470711480f46ef2cd3a15c00cdd2 (patch)
tree1b17754762755c99553e8e34a827e728a296a82e /sys/dev/mrsas/mrsas.c
parent241bb95552a39d440519162b544c776adcb7cf57 (diff)
downloadsrc-79c4c4be9618470711480f46ef2cd3a15c00cdd2.tar.gz
src-79c4c4be9618470711480f46ef2cd3a15c00cdd2.zip
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. Reviewed by: imp PR: 261375
Diffstat (limited to 'sys/dev/mrsas/mrsas.c')
-rw-r--r--sys/dev/mrsas/mrsas.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c
index 595dc3e340ae..b271ce6264b4 100644
--- a/sys/dev/mrsas/mrsas.c
+++ b/sys/dev/mrsas/mrsas.c
@@ -1166,6 +1166,7 @@ mrsas_shutdown(device_t dev)
if (sc->reset_in_progress) {
mrsas_dprint(sc, MRSAS_INFO,
"gave up waiting for OCR to be finished\n");
+ return (0);
}
}