Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2019 19:09:50 +0000 (UTC)
From:      Scott Long <scottl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345479 - in head/sys/dev: mpr mps
Message-ID:  <201903241909.x2OJ9ohI020863@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: scottl
Date: Sun Mar 24 19:09:50 2019
New Revision: 345479
URL: https://svnweb.freebsd.org/changeset/base/345479

Log:
  r329522 created problemss with commands that enter the TIMEDOUT state but
  are successfully returned by the card (usually due to an abort being issued
  as part of timeout recovery). Remove what amounts to an insufficient
  KASSERT, and don't overwrite the state value. State should probably be
  re-designed, and that will be done with a future commit.
  
  Reported by:	phk, bei.io
  Reviewed by:	imp, mav
  Differential Revision:	D19677

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

Modified: head/sys/dev/mpr/mpr.c
==============================================================================
--- head/sys/dev/mpr/mpr.c	Sun Mar 24 18:57:03 2019	(r345478)
+++ head/sys/dev/mpr/mpr.c	Sun Mar 24 19:09:50 2019	(r345479)
@@ -2617,10 +2617,8 @@ mpr_intr_locked(void *data)
 			} else {
 				cm = &sc->commands[
 				    le16toh(desc->AddressReply.SMID)];
-				KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE,
-				    ("command SMID %d not inqueue\n",
-				    desc->AddressReply.SMID));
-				cm->cm_state = MPR_CM_STATE_BUSY;
+				if (cm->cm_state != MPR_CM_STATE_TIMEDOUT)
+					cm->cm_state = MPR_CM_STATE_BUSY;
 				cm->cm_reply = reply;
 				cm->cm_reply_data =
 				    le32toh(desc->AddressReply.

Modified: head/sys/dev/mps/mps.c
==============================================================================
--- head/sys/dev/mps/mps.c	Sun Mar 24 18:57:03 2019	(r345478)
+++ head/sys/dev/mps/mps.c	Sun Mar 24 19:09:50 2019	(r345479)
@@ -2481,9 +2481,8 @@ mps_intr_locked(void *data)
 			} else {
 				cm = &sc->commands[
 				    le16toh(desc->AddressReply.SMID)];
-				KASSERT(cm->cm_state == MPS_CM_STATE_INQUEUE,
-				    ("command not inqueue\n"));
-				cm->cm_state = MPS_CM_STATE_BUSY;
+				if (cm->cm_state != MPS_MPS_STATE_TIMEDOUT)
+					cm->cm_state = MPS_CM_STATE_BUSY;
 				cm->cm_reply = reply;
 				cm->cm_reply_data = le32toh(
 				    desc->AddressReply.ReplyFrameAddress);



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