Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mps/mps_sas.c
Show First 20 Lines • Show All 2,214 Lines • ▼ Show 20 Lines | if ((cm->cm_flags & MPS_CM_FLAGS_ERROR_MASK) != 0) { | ||||
if ((sassc->flags & MPSSAS_QUEUE_FROZEN) == 0) { | if ((sassc->flags & MPSSAS_QUEUE_FROZEN) == 0) { | ||||
xpt_freeze_simq(sassc->sim, 1); | xpt_freeze_simq(sassc->sim, 1); | ||||
sassc->flags |= MPSSAS_QUEUE_FROZEN; | sassc->flags |= MPSSAS_QUEUE_FROZEN; | ||||
mps_dprint(sc, MPS_XINFO, "Error sending command, " | mps_dprint(sc, MPS_XINFO, "Error sending command, " | ||||
"freezing SIM queue\n"); | "freezing SIM queue\n"); | ||||
} | } | ||||
} | } | ||||
/* | |||||
* If this is a Start Stop Unit command and it was issued by the driver | |||||
* during shutdown, decrement the refcount to account for all of the | |||||
* commands that were sent. All SSU commands should be completed before | |||||
* shutdown completes, meaning SSU_refcount will be 0 after SSU_started | |||||
* is TRUE. | |||||
*/ | |||||
if (sc->SSU_started && (csio->cdb_io.cdb_bytes[0] == START_STOP_UNIT)) { | |||||
mps_dprint(sc, MPS_INFO, "Decrementing SSU count.\n"); | |||||
sc->SSU_refcount--; | |||||
} | |||||
/* Take the fast path to completion */ | /* Take the fast path to completion */ | ||||
if (cm->cm_reply == NULL) { | if (cm->cm_reply == NULL) { | ||||
if (mpssas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { | if (mpssas_get_ccbstatus(ccb) == CAM_REQ_INPROG) { | ||||
if ((sc->mps_flags & MPS_FLAGS_DIAGRESET) != 0) | if ((sc->mps_flags & MPS_FLAGS_DIAGRESET) != 0) | ||||
mpssas_set_ccbstatus(ccb, CAM_SCSI_BUS_RESET); | mpssas_set_ccbstatus(ccb, CAM_SCSI_BUS_RESET); | ||||
else { | else { | ||||
mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); | mpssas_set_ccbstatus(ccb, CAM_REQ_CMP); | ||||
ccb->csio.scsi_status = SCSI_STATUS_OK; | ccb->csio.scsi_status = SCSI_STATUS_OK; | ||||
▲ Show 20 Lines • Show All 1,506 Lines • Show Last 20 Lines |