Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sdhci/sdhci.c
Show First 20 Lines • Show All 2,507 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
sdhci_start_slot(struct sdhci_slot *slot) | sdhci_start_slot(struct sdhci_slot *slot) | ||||
{ | { | ||||
if ((slot->devq = cam_simq_alloc(1)) == NULL) | if ((slot->devq = cam_simq_alloc(1)) == NULL) | ||||
goto fail; | goto fail; | ||||
mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); | mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); | ||||
slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, | slot->sim = cam_sim_alloc_dev(sdhci_cam_action, sdhci_cam_poll, | ||||
"sdhci_slot", slot, device_get_unit(slot->bus), | "sdhci_slot", slot, slot->bus, | ||||
&slot->sim_mtx, 1, 1, slot->devq); | &slot->sim_mtx, 1, 1, slot->devq); | ||||
if (slot->sim == NULL) { | if (slot->sim == NULL) { | ||||
cam_simq_free(slot->devq); | cam_simq_free(slot->devq); | ||||
slot_printf(slot, "cannot allocate CAM SIM\n"); | slot_printf(slot, "cannot allocate CAM SIM\n"); | ||||
goto fail; | goto fail; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |