Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr.c
Show First 20 Lines • Show All 1,580 Lines • ▼ Show 20 Lines | for (i = 1; i < sc->num_reqs; i++) { | ||||
/* 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) | if (bus_dmamap_create(sc->buffer_dmat, 0, &cm->cm_dmamap) | ||||
== 0) { | == 0) { | ||||
if (i <= sc->num_prireqs) | if (i <= sc->num_prireqs) | ||||
mpr_free_high_priority_command(sc, cm); | mpr_free_high_priority_command(sc, cm); | ||||
else | else | ||||
mpr_free_command(sc, cm); | mpr_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); | ||||
} | } | ||||
/* | /* | ||||
* Allocate contiguous buffers for PCIe NVMe devices for building native PRPs, | * Allocate contiguous buffers for PCIe NVMe devices for building native PRPs, | ||||
* which are scatter/gather lists for NVMe devices. | * which are scatter/gather lists for NVMe devices. | ||||
▲ Show 20 Lines • Show All 2,426 Lines • Show Last 20 Lines |