Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/vmbus.c
Show First 20 Lines • Show All 829 Lines • ▼ Show 20 Lines | vmbus_dma_alloc(struct vmbus_softc *sc) | ||||
sc->vmbus_evtflags = evtflags; | sc->vmbus_evtflags = evtflags; | ||||
sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, | sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, | ||||
PAGE_SIZE, &sc->vmbus_mnf1_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); | PAGE_SIZE, &sc->vmbus_mnf1_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); | ||||
if (sc->vmbus_mnf1 == NULL) | if (sc->vmbus_mnf1 == NULL) | ||||
return ENOMEM; | return ENOMEM; | ||||
sc->vmbus_mnf2 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, | sc->vmbus_mnf2 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, | ||||
PAGE_SIZE, &sc->vmbus_mnf2_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); | sizeof(struct vmbus_mnf), &sc->vmbus_mnf2_dma, | ||||
BUS_DMA_WAITOK | BUS_DMA_ZERO); | |||||
if (sc->vmbus_mnf2 == NULL) | if (sc->vmbus_mnf2 == NULL) | ||||
return ENOMEM; | return ENOMEM; | ||||
return 0; | return 0; | ||||
} | } | ||||
static void | static void | ||||
vmbus_dma_free(struct vmbus_softc *sc) | vmbus_dma_free(struct vmbus_softc *sc) | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |