Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2018 19:59:37 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337724 - head/sys/dev/mps
Message-ID:  <201808131959.w7DJxbV2047536@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808131959.w7DJxbV2047536>