Lines Matching refs:stk_urb

298 	struct stk1160_urb *stk_urb = urb->context;  in stk1160_isoc_irq()  local
299 struct stk1160 *dev = stk_urb->dev; in stk1160_isoc_irq()
315 invalidate_kernel_vmap_range(stk_urb->transfer_buffer, in stk1160_isoc_irq()
317 dma_sync_sgtable_for_cpu(dma_dev, stk_urb->sgt, DMA_FROM_DEVICE); in stk1160_isoc_irq()
327 dma_sync_sgtable_for_device(dma_dev, stk_urb->sgt, DMA_FROM_DEVICE); in stk1160_isoc_irq()
363 static void stk_free_urb(struct stk1160 *dev, struct stk1160_urb *stk_urb) in stk_free_urb() argument
367 dma_vunmap_noncontiguous(dma_dev, stk_urb->transfer_buffer); in stk_free_urb()
368 dma_free_noncontiguous(dma_dev, stk_urb->urb->transfer_buffer_length, in stk_free_urb()
369 stk_urb->sgt, DMA_FROM_DEVICE); in stk_free_urb()
370 usb_free_urb(stk_urb->urb); in stk_free_urb()
372 stk_urb->transfer_buffer = NULL; in stk_free_urb()
373 stk_urb->sgt = NULL; in stk_free_urb()
374 stk_urb->urb = NULL; in stk_free_urb()
375 stk_urb->dev = NULL; in stk_free_urb()
376 stk_urb->dma = 0; in stk_free_urb()
407 static int stk1160_fill_urb(struct stk1160 *dev, struct stk1160_urb *stk_urb, in stk1160_fill_urb() argument
412 stk_urb->urb = usb_alloc_urb(max_packets, GFP_KERNEL); in stk1160_fill_urb()
413 if (!stk_urb->urb) in stk1160_fill_urb()
415 stk_urb->sgt = dma_alloc_noncontiguous(dma_dev, sb_size, in stk1160_fill_urb()
422 if (!stk_urb->sgt) in stk1160_fill_urb()
425 stk_urb->transfer_buffer = dma_vmap_noncontiguous(dma_dev, sb_size, in stk1160_fill_urb()
426 stk_urb->sgt); in stk1160_fill_urb()
427 if (!stk_urb->transfer_buffer) in stk1160_fill_urb()
430 stk_urb->dma = stk_urb->sgt->sgl->dma_address; in stk1160_fill_urb()
431 stk_urb->dev = dev; in stk1160_fill_urb()
434 dma_free_noncontiguous(dma_dev, sb_size, stk_urb->sgt, DMA_FROM_DEVICE); in stk1160_fill_urb()
435 stk_urb->sgt = NULL; in stk1160_fill_urb()
437 usb_free_urb(stk_urb->urb); in stk1160_fill_urb()
438 stk_urb->urb = NULL; in stk1160_fill_urb()