Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ata/ata_xpt.c
Show First 20 Lines • Show All 720 Lines • ▼ Show 20 Lines | negotiate: | ||||
xpt_action(start_ccb); | xpt_action(start_ccb); | ||||
} | } | ||||
static void | static void | ||||
aproberequestdefaultnegotiation(struct cam_periph *periph) | aproberequestdefaultnegotiation(struct cam_periph *periph) | ||||
{ | { | ||||
struct ccb_trans_settings cts; | struct ccb_trans_settings cts; | ||||
bzero(&cts, sizeof(cts)); | xpt_setup_stack_ccb(&cts.ccb_h, sizeof(cts), periph->path, | ||||
xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); | CAM_PRIORITY_NONE); | ||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_USER_SETTINGS; | cts.type = CTS_TYPE_USER_SETTINGS; | ||||
xpt_action((union ccb *)&cts); | xpt_action((union ccb *)&cts); | ||||
if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) | if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) | ||||
return; | return; | ||||
cts.xport_specific.valid = 0; | cts.xport_specific.valid = 0; | ||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_SETTINGS; | ||||
▲ Show 20 Lines • Show All 746 Lines • ▼ Show 20 Lines | if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && | ||||
/* everything else will be probed by it */ | /* everything else will be probed by it */ | ||||
/* Free the current request path- we're done with it. */ | /* Free the current request path- we're done with it. */ | ||||
xpt_free_path(work_ccb->ccb_h.path); | xpt_free_path(work_ccb->ccb_h.path); | ||||
goto done; | goto done; | ||||
} else { | } else { | ||||
struct ccb_trans_settings cts; | struct ccb_trans_settings cts; | ||||
/* Report SIM that PM is absent. */ | /* Report SIM that PM is absent. */ | ||||
bzero(&cts, sizeof(cts)); | xpt_setup_stack_ccb(&cts.ccb_h, sizeof(cts), | ||||
xpt_setup_ccb(&cts.ccb_h, | work_ccb->ccb_h.path, | ||||
work_ccb->ccb_h.path, CAM_PRIORITY_NONE); | CAM_PRIORITY_NONE); | ||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_SETTINGS; | ||||
cts.xport_specific.sata.pm_present = 0; | cts.xport_specific.sata.pm_present = 0; | ||||
cts.xport_specific.sata.valid = CTS_SATA_VALID_PM; | cts.xport_specific.sata.valid = CTS_SATA_VALID_PM; | ||||
xpt_action((union ccb *)&cts); | xpt_action((union ccb *)&cts); | ||||
} | } | ||||
} | } | ||||
/* Free the current request path- we're done with it. */ | /* Free the current request path- we're done with it. */ | ||||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | ata_device_transport(struct cam_path *path) | ||||
} else if (path->device->protocol == PROTO_SCSI) { | } else if (path->device->protocol == PROTO_SCSI) { | ||||
path->device->protocol_version = inq_buf ? | path->device->protocol_version = inq_buf ? | ||||
SID_ANSI_REV(inq_buf) : cpi.protocol_version; | SID_ANSI_REV(inq_buf) : cpi.protocol_version; | ||||
} | } | ||||
path->device->transport_version = ident_buf ? | path->device->transport_version = ident_buf ? | ||||
ata_version(ident_buf->version_major) : cpi.transport_version; | ata_version(ident_buf->version_major) : cpi.transport_version; | ||||
/* Tell the controller what we think */ | /* Tell the controller what we think */ | ||||
bzero(&cts, sizeof(cts)); | xpt_setup_stack_ccb(&cts.ccb_h, sizeof(cts), path, CAM_PRIORITY_NONE); | ||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); | |||||
cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_SETTINGS; | ||||
cts.transport = path->device->transport; | cts.transport = path->device->transport; | ||||
cts.transport_version = path->device->transport_version; | cts.transport_version = path->device->transport_version; | ||||
cts.protocol = path->device->protocol; | cts.protocol = path->device->protocol; | ||||
cts.protocol_version = path->device->protocol_version; | cts.protocol_version = path->device->protocol_version; | ||||
cts.proto_specific.valid = 0; | cts.proto_specific.valid = 0; | ||||
if (ident_buf) { | if (ident_buf) { | ||||
▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines |