Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_xpt.c
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | mmc_announce_periph(struct cam_periph *periph) | ||||
struct ccb_pathinq cpi; | struct ccb_pathinq cpi; | ||||
struct ccb_trans_settings cts; | struct ccb_trans_settings cts; | ||||
struct cam_path *path = periph->path; | struct cam_path *path = periph->path; | ||||
cam_periph_assert(periph, MA_OWNED); | cam_periph_assert(periph, MA_OWNED); | ||||
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); | CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); | ||||
memset(&cts, 0, sizeof(cts)); | xpt_setup_stack_ccb(&cts.ccb_h, sizeof(cts), path, | ||||
xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); | CAM_PRIORITY_NORMAL); | ||||
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; | ||||
cts.type = CTS_TYPE_CURRENT_SETTINGS; | cts.type = CTS_TYPE_CURRENT_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; | ||||
xpt_path_inq(&cpi, periph->path); | xpt_path_inq(&cpi, periph->path); | ||||
CAM_DEBUG(path, CAM_DEBUG_INFO, | CAM_DEBUG(path, CAM_DEBUG_INFO, | ||||
("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); | ("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); | ||||
▲ Show 20 Lines • Show All 797 Lines • Show Last 20 Lines |