svn commit: r349909 - head/sys/dev/mpr

Warner Losh imp at FreeBSD.org
Thu Jul 11 06:22:16 UTC 2019


Author: imp
Date: Thu Jul 11 06:22:15 2019
New Revision: 349909
URL: https://svnweb.freebsd.org/changeset/base/349909

Log:
  More fully implement the state machine.
  
  When a command is finished running, we must transition it from INQUEUE
  to busy state. We were failing to do that, so we hit a panic when the
  commands were freed. This only affects mpr, mps already did simmilar
  things. Now both the polling and interrupt paths properly set BUSY as
  appropriate.

Modified:
  head/sys/dev/mpr/mpr.c

Modified: head/sys/dev/mpr/mpr.c
==============================================================================
--- head/sys/dev/mpr/mpr.c	Thu Jul 11 04:40:58 2019	(r349908)
+++ head/sys/dev/mpr/mpr.c	Thu Jul 11 06:22:15 2019	(r349909)
@@ -2367,6 +2367,7 @@ mpr_complete_command(struct mpr_softc *sc, struct mpr_
 		return;
 	}
 
+	cm->cm_state = MPR_CM_STATE_BUSY;
 	if (cm->cm_flags & MPR_CM_FLAGS_POLLED)
 		cm->cm_flags |= MPR_CM_FLAGS_COMPLETE;
 
@@ -3879,7 +3880,7 @@ mpr_request_polled(struct mpr_softc *sc, struct mpr_co
 			break;
 		}
 	}
-
+	cm->cm_state = MPR_CM_STATE_BUSY;
 	if (error) {
 		mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s\n", __func__);
 		rc = mpr_reinit(sc);


More information about the svn-src-all mailing list