Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_xpt.c
Show First 20 Lines • Show All 2,731 Lines • ▼ Show 20 Lines | scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path, | ||||
if (cts->protocol != PROTO_SCSI) { | if (cts->protocol != PROTO_SCSI) { | ||||
if (async_update == FALSE) | if (async_update == FALSE) | ||||
xpt_action_default((union ccb *)cts); | xpt_action_default((union ccb *)cts); | ||||
return; | return; | ||||
} | } | ||||
inq_data = &device->inq_data; | inq_data = &device->inq_data; | ||||
scsi = &cts->proto_specific.scsi; | scsi = &cts->proto_specific.scsi; | ||||
memset(&cpi, 0, sizeof(cpi)); | |||||
xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); | xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); | ||||
cpi.ccb_h.func_code = XPT_PATH_INQ; | cpi.ccb_h.func_code = XPT_PATH_INQ; | ||||
xpt_action((union ccb *)&cpi); | xpt_action((union ccb *)&cpi); | ||||
/* SCSI specific sanity checking */ | /* SCSI specific sanity checking */ | ||||
if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 | if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 | ||||
|| (INQ_DATA_TQ_ENABLED(inq_data)) == 0 | || (INQ_DATA_TQ_ENABLED(inq_data)) == 0 | ||||
|| (device->queue_flags & SCP_QUEUE_DQUE) != 0 | || (device->queue_flags & SCP_QUEUE_DQUE) != 0 | ||||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void | static void | ||||
scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) | scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) | ||||
{ | { | ||||
struct ccb_trans_settings cts; | struct ccb_trans_settings cts; | ||||
u_int speed, freq, mb; | u_int speed, freq, mb; | ||||
memset(&cts, 0, sizeof(cts)); | |||||
_scsi_announce_periph(periph, &speed, &freq, &cts); | _scsi_announce_periph(periph, &speed, &freq, &cts); | ||||
if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP) | if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP) | ||||
return; | return; | ||||
mb = speed / 1000; | mb = speed / 1000; | ||||
if (mb > 0) | if (mb > 0) | ||||
sbuf_printf(sb, "%s%d: %d.%03dMB/s transfers", | sbuf_printf(sb, "%s%d: %d.%03dMB/s transfers", | ||||
periph->periph_name, periph->unit_number, | periph->periph_name, periph->unit_number, | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |