Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mps/mps.c
Show First 20 Lines • Show All 1,529 Lines • ▼ Show 20 Lines | for (i = 1; i < sc->num_reqs; i++) { | ||||
callout_init_mtx(&cm->cm_callout, &sc->mps_mtx, 0); | callout_init_mtx(&cm->cm_callout, &sc->mps_mtx, 0); | ||||
/* XXX Is a failure here a critical problem? */ | /* XXX Is a failure here a critical problem? */ | ||||
if (bus_dmamap_create(sc->buffer_dmat, 0, &cm->cm_dmamap) == 0) | if (bus_dmamap_create(sc->buffer_dmat, 0, &cm->cm_dmamap) == 0) | ||||
if (i <= sc->num_prireqs) | if (i <= sc->num_prireqs) | ||||
mps_free_high_priority_command(sc, cm); | mps_free_high_priority_command(sc, cm); | ||||
else | else | ||||
mps_free_command(sc, cm); | mps_free_command(sc, cm); | ||||
else { | else | ||||
panic("failed to allocate command %d\n", i); | panic("failed to allocate command %d\n", i); | ||||
sc->num_reqs = i; | |||||
break; | |||||
} | |||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
mps_init_queues(struct mps_softc *sc) | mps_init_queues(struct mps_softc *sc) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,707 Lines • Show Last 20 Lines |