Lines Matching refs:token
254 static inline void asd_dmatok_free(struct asd_dma_tok *token) in asd_dmatok_free() argument
256 kmem_cache_free(asd_dma_token_cache, token); in asd_dmatok_free()
263 struct asd_dma_tok *token = asd_dmatok_alloc(flags); in asd_alloc_coherent() local
264 if (token) { in asd_alloc_coherent()
265 token->size = size; in asd_alloc_coherent()
266 token->vaddr = dma_alloc_coherent(&asd_ha->pcidev->dev, in asd_alloc_coherent()
267 token->size, in asd_alloc_coherent()
268 &token->dma_handle, in asd_alloc_coherent()
270 if (!token->vaddr) { in asd_alloc_coherent()
271 asd_dmatok_free(token); in asd_alloc_coherent()
272 token = NULL; in asd_alloc_coherent()
275 return token; in asd_alloc_coherent()
279 struct asd_dma_tok *token) in asd_free_coherent() argument
281 if (token) { in asd_free_coherent()
282 dma_free_coherent(&asd_ha->pcidev->dev, token->size, in asd_free_coherent()
283 token->vaddr, token->dma_handle); in asd_free_coherent()
284 asd_dmatok_free(token); in asd_free_coherent()