Lines Matching refs:urb
227 static void stk1160_process_isoc(struct stk1160 *dev, struct urb *urb) in stk1160_process_isoc() argument
237 if (urb->status < 0) { in stk1160_process_isoc()
239 print_err_status(dev, -1, urb->status); in stk1160_process_isoc()
243 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_process_isoc()
244 status = urb->iso_frame_desc[i].status; in stk1160_process_isoc()
251 p = urb->transfer_buffer + urb->iso_frame_desc[i].offset; in stk1160_process_isoc()
252 len = urb->iso_frame_desc[i].actual_length; in stk1160_process_isoc()
305 static void stk1160_isoc_irq(struct urb *urb) in stk1160_isoc_irq() argument
308 struct stk1160 *dev = urb->context; in stk1160_isoc_irq()
310 switch (urb->status) { in stk1160_isoc_irq()
319 stk1160_err("urb error! status %d\n", urb->status); in stk1160_isoc_irq()
323 stk1160_process_isoc(dev, urb); in stk1160_isoc_irq()
326 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_isoc_irq()
327 urb->iso_frame_desc[i].status = 0; in stk1160_isoc_irq()
328 urb->iso_frame_desc[i].actual_length = 0; in stk1160_isoc_irq()
331 rc = usb_submit_urb(urb, GFP_ATOMIC); in stk1160_isoc_irq()
360 usb_kill_urb(dev->isoc_ctl.urb[i]); in stk1160_cancel_isoc()
372 struct urb *urb; in stk1160_free_isoc() local
379 urb = dev->isoc_ctl.urb[i]; in stk1160_free_isoc()
380 if (urb) { in stk1160_free_isoc()
385 urb->transfer_buffer_length, in stk1160_free_isoc()
387 urb->transfer_dma); in stk1160_free_isoc()
392 usb_free_urb(urb); in stk1160_free_isoc()
393 dev->isoc_ctl.urb[i] = NULL; in stk1160_free_isoc()
398 kfree(dev->isoc_ctl.urb); in stk1160_free_isoc()
401 dev->isoc_ctl.urb = NULL; in stk1160_free_isoc()
423 struct urb *urb; in stk1160_alloc_isoc() local
442 dev->isoc_ctl.urb = kzalloc(sizeof(void *)*num_bufs, GFP_KERNEL); in stk1160_alloc_isoc()
443 if (!dev->isoc_ctl.urb) { in stk1160_alloc_isoc()
452 kfree(dev->isoc_ctl.urb); in stk1160_alloc_isoc()
459 urb = usb_alloc_urb(max_packets, GFP_KERNEL); in stk1160_alloc_isoc()
460 if (!urb) in stk1160_alloc_isoc()
462 dev->isoc_ctl.urb[i] = urb; in stk1160_alloc_isoc()
466 sb_size, GFP_KERNEL, &urb->transfer_dma); in stk1160_alloc_isoc()
484 urb->dev = dev->udev; in stk1160_alloc_isoc()
485 urb->pipe = usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO); in stk1160_alloc_isoc()
486 urb->transfer_buffer = dev->isoc_ctl.transfer_buffer[i]; in stk1160_alloc_isoc()
487 urb->transfer_buffer_length = sb_size; in stk1160_alloc_isoc()
488 urb->complete = stk1160_isoc_irq; in stk1160_alloc_isoc()
489 urb->context = dev; in stk1160_alloc_isoc()
490 urb->interval = 1; in stk1160_alloc_isoc()
491 urb->start_frame = 0; in stk1160_alloc_isoc()
492 urb->number_of_packets = max_packets; in stk1160_alloc_isoc()
494 urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; in stk1160_alloc_isoc()
496 urb->transfer_flags = URB_ISO_ASAP; in stk1160_alloc_isoc()
501 urb->iso_frame_desc[j].offset = k; in stk1160_alloc_isoc()
502 urb->iso_frame_desc[j].length = in stk1160_alloc_isoc()
521 usb_free_urb(dev->isoc_ctl.urb[i]); in stk1160_alloc_isoc()
522 dev->isoc_ctl.urb[i] = NULL; in stk1160_alloc_isoc()