Lines Matching full:descriptors

33  * number of descriptors of required size.
34 * Initialize the descriptors as required by pmc dma.
35 * The descriptors' buffers dwords are initialized to hold
84 wil_dbg_misc(wil, "pmc_alloc: %d descriptors x %d bytes each\n", in wil_pmc_alloc()
87 /* allocate descriptors info list in pmc context*/ in wil_pmc_alloc()
88 pmc->descriptors = kcalloc(num_descriptors, in wil_pmc_alloc()
91 if (!pmc->descriptors) { in wil_pmc_alloc()
96 wil_dbg_misc(wil, "pmc_alloc: allocated descriptors info list %p\n", in wil_pmc_alloc()
97 pmc->descriptors); in wil_pmc_alloc()
99 /* Allocate pring buffer and descriptors. in wil_pmc_alloc()
136 /* initially, all descriptors are SW owned in wil_pmc_alloc()
145 pmc->descriptors[i].va = dma_alloc_coherent(dev, in wil_pmc_alloc()
147 &pmc->descriptors[i].pa, in wil_pmc_alloc()
150 if (unlikely(!pmc->descriptors[i].va)) { in wil_pmc_alloc()
156 u32 *p = (u32 *)pmc->descriptors[i].va + j; in wil_pmc_alloc()
162 cpu_to_le32(lower_32_bits(pmc->descriptors[i].pa)); in wil_pmc_alloc()
164 cpu_to_le16((u16)upper_32_bits(pmc->descriptors[i].pa)); in wil_pmc_alloc()
196 for (i = 0; i < num_descriptors && pmc->descriptors[i].va; i++) { in wil_pmc_alloc()
199 pmc->descriptors[i].va, in wil_pmc_alloc()
200 pmc->descriptors[i].pa); in wil_pmc_alloc()
202 pmc->descriptors[i].va = NULL; in wil_pmc_alloc()
214 wil_err(wil, "exit on error: Releasing descriptors info list...\n"); in wil_pmc_alloc()
215 kfree(pmc->descriptors); in wil_pmc_alloc()
216 pmc->descriptors = NULL; in wil_pmc_alloc()
275 if (pmc->descriptors) { in wil_pmc_free()
279 i < pmc->num_descriptors && pmc->descriptors[i].va; i++) { in wil_pmc_free()
282 pmc->descriptors[i].va, in wil_pmc_free()
283 pmc->descriptors[i].pa); in wil_pmc_free()
284 pmc->descriptors[i].va = NULL; in wil_pmc_free()
289 "pmc_free: free pmc descriptors info list %p\n", in wil_pmc_free()
290 pmc->descriptors); in wil_pmc_free()
291 kfree(pmc->descriptors); in wil_pmc_free()
292 pmc->descriptors = NULL; in wil_pmc_free()
361 pmc->descriptors[idx].va, in wil_pmc_read()