Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mpr/mpr_sas.c
Show First 20 Lines • Show All 1,840 Lines • ▼ Show 20 Lines | if (MPR_SET_LUN(req->LUN, csio->ccb_h.target_lun) != 0) { | ||||
mpr_free_command(sc, cm); | mpr_free_command(sc, cm); | ||||
mprsas_set_ccbstatus(ccb, CAM_LUN_INVALID); | mprsas_set_ccbstatus(ccb, CAM_LUN_INVALID); | ||||
xpt_done(ccb); | xpt_done(ccb); | ||||
return; | return; | ||||
} | } | ||||
if (csio->ccb_h.flags & CAM_CDB_POINTER) | if (csio->ccb_h.flags & CAM_CDB_POINTER) | ||||
bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); | bcopy(csio->cdb_io.cdb_ptr, &req->CDB.CDB32[0], csio->cdb_len); | ||||
else | else { | ||||
KASSERT(csio->cdb_len <= IOCDBLEN, | |||||
("cdb_len %d is greater than IOCDBLEN but CAM_CDB_POINTER is not set", | |||||
csio->cdb_len)); | |||||
bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); | bcopy(csio->cdb_io.cdb_bytes, &req->CDB.CDB32[0],csio->cdb_len); | ||||
} | |||||
req->IoFlags = htole16(csio->cdb_len); | req->IoFlags = htole16(csio->cdb_len); | ||||
/* | /* | ||||
* Check if EEDP is supported and enabled. If it is then check if the | * Check if EEDP is supported and enabled. If it is then check if the | ||||
* SCSI opcode could be using EEDP. If so, make sure the LUN exists and | * SCSI opcode could be using EEDP. If so, make sure the LUN exists and | ||||
* is formatted for EEDP support. If all of this is true, set CDB up | * is formatted for EEDP support. If all of this is true, set CDB up | ||||
* for EEDP transfer. | * for EEDP transfer. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 565 Lines • ▼ Show 20 Lines | case MPI2_IOCSTATUS_SCSI_RECOVERED_ERROR: | ||||
} | } | ||||
/* | /* | ||||
* If this is a SATA direct-access end device, mark it so that | * If this is a SATA direct-access end device, mark it so that | ||||
* a SCSI StartStopUnit command will be sent to it when the | * a SCSI StartStopUnit command will be sent to it when the | ||||
* driver is being shutdown. | * driver is being shutdown. | ||||
*/ | */ | ||||
if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && | if ((csio->cdb_io.cdb_bytes[0] == INQUIRY) && | ||||
(csio->data_ptr != NULL) && | |||||
((csio->data_ptr[0] & 0x1f) == T_DIRECT) && | ((csio->data_ptr[0] & 0x1f) == T_DIRECT) && | ||||
(sc->mapping_table[target_id].device_info & | (sc->mapping_table[target_id].device_info & | ||||
MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && | MPI2_SAS_DEVICE_INFO_SATA_DEVICE) && | ||||
((sc->mapping_table[target_id].device_info & | ((sc->mapping_table[target_id].device_info & | ||||
MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) == | MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) == | ||||
MPI2_SAS_DEVICE_INFO_END_DEVICE)) { | MPI2_SAS_DEVICE_INFO_END_DEVICE)) { | ||||
target = &sassc->targets[target_id]; | target = &sassc->targets[target_id]; | ||||
target->supports_SSU = TRUE; | target->supports_SSU = TRUE; | ||||
▲ Show 20 Lines • Show All 1,121 Lines • Show Last 20 Lines |