Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/mmc/mmc_xpt.c
Context not available. | |||||
printf("XPT info: CLK %04X, ...\n", cts.proto_specific.mmc.ios.clock); | printf("XPT info: CLK %04X, ...\n", cts.proto_specific.mmc.ios.clock); | ||||
} | } | ||||
void | |||||
mmccam_start_discovery(struct cam_sim *sim) { | |||||
union ccb *ccb; | |||||
uint32_t pathid; | |||||
KASSERT(sim->sim_dev != NULL, ("mmccam_start_discovery(%s): sim_dev is not initialized," | |||||
" has cam_sim_alloc_dev() been used?", cam_sim_name(sim))); | |||||
pathid = cam_sim_path(sim); | |||||
ccb = xpt_alloc_ccb(); | |||||
imp: I'd print a warning here... why was no wait used though? | |||||
Done Inline ActionsIndeed _nowait() is excessive, it's fine to wait. kibab: Indeed _nowait() is excessive, it's fine to wait. | |||||
if (ccb == NULL) { | |||||
device_printf(sim->sim_dev, "Cannot allocate CCB for starting MMC discovery\n"); | |||||
impUnsubmitted Not Done Inline ActionsWith the waiting version, you don't get null returns. . imp: With the waiting version, you don't get null returns. . | |||||
return; | |||||
} | |||||
/* | |||||
* We create a rescan request for BUS:0:0, since the card | |||||
* will be at lun 0. | |||||
*/ | |||||
if (xpt_create_path(&ccb->ccb_h.path, NULL, pathid, | |||||
/* target */ 0, /* lun */ 0) != CAM_REQ_CMP) { | |||||
xpt_free_ccb(ccb); | |||||
device_printf(sim->sim_dev, "Cannot create path for MMC discovery request\n"); | |||||
return; | |||||
} | |||||
xpt_rescan(ccb); | |||||
} | |||||
/* This func is called per attached device :-( */ | /* This func is called per attached device :-( */ | ||||
void | void | ||||
mmc_print_ident(struct mmc_params *ident_data) | mmc_print_ident(struct mmc_params *ident_data) | ||||
Context not available. |
I'd print a warning here... why was no wait used though?