Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 2024 18:01:17 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: aea9f26d8005 - stable/13 - mpr/mps: when sending reset on removal, include target in message
Message-ID:  <202412281801.4BSI1Hia038413@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=aea9f26d8005e32ad840d0490af94866787e2731

commit aea9f26d8005e32ad840d0490af94866787e2731
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-12-28 17:59:59 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-12-28 18:00:54 +0000

    mpr/mps: when sending reset on removal, include target in message
    
    It's possible for muliple drives to be departing at the same time (if
    the common power rail the share goes dark, for example). To understand
    what's going on better, include target and handle in the messages
    announcing the reset to allow matching with other corresponding events.
    
    MFC After:              3 days
    Sponsored by:           Netflix
    Reviewed by:            mav
    Differential Revision:  https://reviews.freebsd.org/D35092
    
    (cherry picked from commit ca420b4ef2ceac00f6c6905252d553a86100ab6a)
---
 sys/dev/mpr/mpr_sas.c | 8 ++++++--
 sys/dev/mps/mps_sas.c | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c
index cd6cbe4981c8..a346f69750d8 100644
--- a/sys/dev/mpr/mpr_sas.c
+++ b/sys/dev/mpr/mpr_sas.c
@@ -616,7 +616,9 @@ mprsas_remove_device(struct mpr_softc *sc, struct mpr_command *tm)
 	 * if so.
 	 */
 	if (TAILQ_FIRST(&targ->commands) == NULL) {
-		mpr_dprint(sc, MPR_INFO, "No pending commands: starting remove_device\n");
+		mpr_dprint(sc, MPR_INFO,
+		    "No pending commands: starting remove_device for target %u handle 0x%04x\n",
+		    targ->tid, handle);
 		mpr_map_command(sc, tm);
 		targ->pending_remove_tm = NULL;
 	} else {
@@ -2836,7 +2838,9 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm)
 	if (cm->cm_targ->flags & MPRSAS_TARGET_INREMOVAL) {
 		if (TAILQ_FIRST(&cm->cm_targ->commands) == NULL &&
 		    cm->cm_targ->pending_remove_tm != NULL) {
-			mpr_dprint(sc, MPR_INFO, "Last pending command complete: starting remove_device\n");
+			mpr_dprint(sc, MPR_INFO,
+			    "Last pending command complete: starting remove_device target %u handle 0x%04x\n",
+			    cm->cm_targ->tid, cm->cm_targ->handle);
 			mpr_map_command(sc, cm->cm_targ->pending_remove_tm);
 			cm->cm_targ->pending_remove_tm = NULL;
 		}
diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c
index 39423bf3f348..17f9b2ba28ad 100644
--- a/sys/dev/mps/mps_sas.c
+++ b/sys/dev/mps/mps_sas.c
@@ -587,7 +587,9 @@ mpssas_remove_device(struct mps_softc *sc, struct mps_command *tm)
 	 * if so.
 	 */
 	if (TAILQ_FIRST(&targ->commands) == NULL) {
-		mps_dprint(sc, MPS_INFO, "No pending commands: starting remove_device\n");
+		mps_dprint(sc, MPS_INFO,
+		    "No pending commands: starting remove_device target %u handle 0x%04x\n",
+		    targ->tid, handle);
 		mps_map_command(sc, tm);
 		targ->pending_remove_tm = NULL;
 	} else {
@@ -2378,7 +2380,9 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm)
 	if (cm->cm_targ->flags & MPSSAS_TARGET_INREMOVAL) {
 		if (TAILQ_FIRST(&cm->cm_targ->commands) == NULL &&
 		    cm->cm_targ->pending_remove_tm != NULL) {
-			mps_dprint(sc, MPS_INFO, "Last pending command complete: starting remove_device\n");
+			mps_dprint(sc, MPS_INFO,
+			    "Last pending command complete: starting remove_device target %u handle 0x%04x\n",
+			    cm->cm_targ->tid, cm->cm_targ->handle);
 			mps_map_command(sc, cm->cm_targ->pending_remove_tm);
 			cm->cm_targ->pending_remove_tm = NULL;
 		}



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