Lines Matching full:mem
51 i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size) in i40e_allocate_virt_mem() argument
53 mem->va = malloc(size, M_IXL, M_NOWAIT | M_ZERO); in i40e_allocate_virt_mem()
54 return (mem->va == NULL); in i40e_allocate_virt_mem()
58 i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem) in i40e_free_virt_mem() argument
60 free(mem->va, M_IXL); in i40e_free_virt_mem()
61 mem->va = NULL; in i40e_free_virt_mem()
67 i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, in i40e_allocate_dma_mem() argument
85 &mem->tag); in i40e_allocate_dma_mem()
92 err = bus_dmamem_alloc(mem->tag, (void **)&mem->va, in i40e_allocate_dma_mem()
93 BUS_DMA_NOWAIT | BUS_DMA_ZERO, &mem->map); in i40e_allocate_dma_mem()
100 err = bus_dmamap_load(mem->tag, mem->map, mem->va, in i40e_allocate_dma_mem()
103 &mem->pa, in i40e_allocate_dma_mem()
111 mem->size = size; in i40e_allocate_dma_mem()
112 bus_dmamap_sync(mem->tag, mem->map, in i40e_allocate_dma_mem()
116 bus_dmamem_free(mem->tag, mem->va, mem->map); in i40e_allocate_dma_mem()
118 bus_dma_tag_destroy(mem->tag); in i40e_allocate_dma_mem()
120 mem->map = NULL; in i40e_allocate_dma_mem()
121 mem->tag = NULL; in i40e_allocate_dma_mem()
126 i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem) in i40e_free_dma_mem() argument
128 bus_dmamap_sync(mem->tag, mem->map, in i40e_free_dma_mem()
130 bus_dmamap_unload(mem->tag, mem->map); in i40e_free_dma_mem()
131 bus_dmamem_free(mem->tag, mem->va, mem->map); in i40e_free_dma_mem()
132 bus_dma_tag_destroy(mem->tag); in i40e_free_dma_mem()