svn commit: r337724 - head/sys/dev/mps

Warner Losh imp at FreeBSD.org
Mon Aug 13 19:59:39 UTC 2018


Author: imp
Date: Mon Aug 13 19:59:37 2018
New Revision: 337724
URL: https://svnweb.freebsd.org/changeset/base/337724

Log:
  Call xpt_sim_poll in shutdown_final handler.
  
  When we're shutting down, we send a number of start/stop commands to
  the known targets. We have to wait for them to complete. During a
  panic, the interrupts are off, and using pause to wait for them to
  fire and complete won't work: we have to poll after pause returns so
  the completion routines of the CCBs run so we decrement work
  outstanding counts.
  
  Sponsored by: Netflix
  Differential Review: https://reviews.freebsd.org/D16663

Modified:
  head/sys/dev/mps/mps_sas_lsi.c

Modified: head/sys/dev/mps/mps_sas_lsi.c
==============================================================================
--- head/sys/dev/mps/mps_sas_lsi.c	Mon Aug 13 19:59:32 2018	(r337723)
+++ head/sys/dev/mps/mps_sas_lsi.c	Mon Aug 13 19:59:37 2018	(r337724)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/uio.h>
 #include <sys/sysctl.h>
 #include <sys/endian.h>
+#include <sys/proc.h>
 #include <sys/queue.h>
 #include <sys/kthread.h>
 #include <sys/taskqueue.h>
@@ -1209,7 +1210,9 @@ mpssas_SSU_to_SATA_devices(struct mps_softc *sc, int h
 	 */
 	while (sc->SSU_refcount > 0) {
 		pause("mpswait", hz/10);
-		
+		if (SCHEDULER_STOPPED())
+			xpt_sim_poll(sassc->sim);
+
 		if (--timeout == 0) {
 			mps_dprint(sc, MPS_FAULT, "Time has expired waiting "
 			    "for SSU commands to complete.\n");


More information about the svn-src-head mailing list