Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_xpt.c
Show First 20 Lines • Show All 568 Lines • ▼ Show 20 Lines | mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb) | ||||
} | } | ||||
/* Here is the place where the identify fun begins */ | /* Here is the place where the identify fun begins */ | ||||
switch (softc->action) { | switch (softc->action) { | ||||
case PROBE_RESET: | case PROBE_RESET: | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
case PROBE_IDENTIFY: | case PROBE_IDENTIFY: | ||||
xpt_path_inq(&start_ccb->cpi, periph->path); | xpt_path_inq(&start_ccb->cpi, periph->path); | ||||
CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); | CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); | ||||
init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); | |||||
xpt_action(start_ccb); | |||||
if (cts->ios.power_mode != power_off) { | |||||
init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); | init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); | ||||
cts->ios.power_mode = power_off; | cts->ios.power_mode = power_off; | ||||
cts->ios_valid = MMC_PM; | cts->ios_valid = MMC_PM; | ||||
xpt_action(start_ccb); | xpt_action(start_ccb); | ||||
mtx_sleep(periph, p_mtx, 0, "mmcios", 100); | mtx_sleep(periph, p_mtx, 0, "mmcios", 100); | ||||
imp: I'm not sure we're allowed to sleep here... But there's many other places we sleep so I'm not… | |||||
kibabAuthorUnsubmitted Not Done Inline ActionsStrictly speaking, no sleeps should be here. But yes, eliminating sleeps is another problem. kibab: Strictly speaking, no sleeps should be here. But yes, eliminating sleeps is another problem. | |||||
} | |||||
/* mmc_power_up */ | /* mmc_power_up */ | ||||
/* Get the host OCR */ | /* Get the host OCR */ | ||||
init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); | init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); | ||||
xpt_action(start_ccb); | xpt_action(start_ccb); | ||||
uint32_t hv = mmc_highest_voltage(cts->host_ocr); | uint32_t hv = mmc_highest_voltage(cts->host_ocr); | ||||
init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); | init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); | ||||
cts->ios.vdd = hv; | cts->ios.vdd = hv; | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |
I'm not sure we're allowed to sleep here... But there's many other places we sleep so I'm not going to hold things up for that.