From 694cb8b8150d85a3dd18beb588920b43841791d2 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 4 Nov 2016 17:25:47 +0000 Subject: [PATCH] Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors. Submitted by: slm Obtained from: Netflix MFC after: 3 days --- sys/dev/mpr/mpr_sas.c | 10 ++++++---- sys/dev/mps/mps_sas.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index d44e5026169d..bb5c7ee1aabe 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -2496,8 +2496,9 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) */ mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mprsas_log_command(cm, MPR_INFO, - "terminated ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "terminated ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); break; case MPI2_IOCSTATUS_INVALID_FUNCTION: @@ -2512,8 +2513,9 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) case MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED: default: mprsas_log_command(cm, MPR_XINFO, - "completed ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "completed ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); csio->resid = cm->cm_length; mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 2ff4389a1a25..f39945b67877 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -2446,8 +2446,9 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm) */ mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mpssas_log_command(cm, MPS_INFO, - "terminated ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "terminated ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); break; case MPI2_IOCSTATUS_INVALID_FUNCTION: @@ -2462,8 +2463,9 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm) case MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED: default: mpssas_log_command(cm, MPS_XINFO, - "completed ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "completed ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); csio->resid = cm->cm_length; mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR);