Date: Thu, 11 Jul 2019 06:22:15 +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: r349909 - head/sys/dev/mpr Message-ID: <201907110622.x6B6MF5S008561@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907110622.x6B6MF5S008561>