diff options
author | Scott Long <scottl@FreeBSD.org> | 2017-05-11 15:19:04 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2017-05-11 15:19:04 +0000 |
commit | 855fe445b355a4de3086fb3ec04f7d4d227ba619 (patch) | |
tree | 5cc523a090fa0feca103571a01a64b6e0683366b | |
parent | 0183e0151669735d62584fbba9125ed90716af5e (diff) | |
download | src-855fe445b355a4de3086fb3ec04f7d4d227ba619.tar.gz src-855fe445b355a4de3086fb3ec04f7d4d227ba619.zip |
Improve error messages during command timeout for the mpr and mps
drivers.
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=318188
-rw-r--r-- | sys/dev/mpr/mpr_sas.c | 9 | ||||
-rw-r--r-- | sys/dev/mps/mps_sas.c | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 09971faa6b03..2974e06a64a8 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -1562,7 +1562,7 @@ mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, return -1; } - mprsas_log_command(tm, MPR_RECOVERY|MPR_INFO, + mprsas_log_command(cm, MPR_RECOVERY|MPR_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1594,7 +1594,7 @@ mprsas_send_abort(struct mpr_softc *sc, struct mpr_command *tm, err = mpr_map_command(sc, tm); if (err) - mprsas_log_command(tm, MPR_RECOVERY, + mpr_dprint(sc, MPR_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1635,8 +1635,9 @@ mprsas_scsiio_timeout(void *data) targ = cm->cm_targ; targ->timeouts++; - mprsas_log_command(cm, MPR_ERROR, "command timeout cm %p ccb %p target " - "%u, handle(0x%04x)\n", cm, cm->cm_ccb, targ->tid, targ->handle); + mprsas_log_command(cm, MPR_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); if (targ->encl_level_valid) { mpr_dprint(sc, MPR_ERROR, "At enclosure level %d, slot %d, " "connector name (%4s)\n", targ->encl_level, targ->encl_slot, diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index ac7b5e2dc534..24c5a8adeb02 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -1505,7 +1505,7 @@ mpssas_send_abort(struct mps_softc *sc, struct mps_command *tm, struct mps_comma return -1; } - mpssas_log_command(tm, MPS_RECOVERY|MPS_INFO, + mpssas_log_command(cm, MPS_RECOVERY|MPS_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1536,7 +1536,7 @@ mpssas_send_abort(struct mps_softc *sc, struct mps_command *tm, struct mps_comma err = mps_map_command(sc, tm); if (err) - mpssas_log_command(tm, MPS_RECOVERY, + mps_dprint(sc, MPS_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1574,12 +1574,13 @@ mpssas_scsiio_timeout(void *data) return; } - mpssas_log_command(cm, MPS_INFO, "command timeout cm %p ccb %p\n", - cm, cm->cm_ccb); - targ = cm->cm_targ; targ->timeouts++; + mpssas_log_command(cm, MPS_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); + /* XXX first, check the firmware state, to see if it's still * operational. if not, do a diag reset. */ |