Lines Matching refs:descriptors
88 pmc->descriptors = kcalloc(num_descriptors, in wil_pmc_alloc()
91 if (!pmc->descriptors) { in wil_pmc_alloc()
97 pmc->descriptors); 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()
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()
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()