Lines Matching refs:urb

230 static void stk1160_process_isoc(struct stk1160 *dev, struct urb *urb)  in stk1160_process_isoc()  argument
240 if (urb->status < 0) { in stk1160_process_isoc()
242 print_err_status(dev, -1, urb->status); in stk1160_process_isoc()
246 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_process_isoc()
247 status = urb->iso_frame_desc[i].status; in stk1160_process_isoc()
254 p = urb->transfer_buffer + urb->iso_frame_desc[i].offset; in stk1160_process_isoc()
255 len = urb->iso_frame_desc[i].actual_length; in stk1160_process_isoc()
308 static void stk1160_isoc_irq(struct urb *urb) in stk1160_isoc_irq() argument
311 struct stk1160 *dev = urb->context; in stk1160_isoc_irq()
313 switch (urb->status) { in stk1160_isoc_irq()
322 stk1160_err("urb error! status %d\n", urb->status); in stk1160_isoc_irq()
326 stk1160_process_isoc(dev, urb); in stk1160_isoc_irq()
329 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_isoc_irq()
330 urb->iso_frame_desc[i].status = 0; in stk1160_isoc_irq()
331 urb->iso_frame_desc[i].actual_length = 0; in stk1160_isoc_irq()
334 rc = usb_submit_urb(urb, GFP_ATOMIC); in stk1160_isoc_irq()
363 usb_kill_urb(dev->isoc_ctl.urb[i]); in stk1160_cancel_isoc()
375 struct urb *urb; in stk1160_free_isoc() local
382 urb = dev->isoc_ctl.urb[i]; in stk1160_free_isoc()
383 if (urb) { in stk1160_free_isoc()
388 urb->transfer_buffer_length, in stk1160_free_isoc()
390 urb->transfer_dma); in stk1160_free_isoc()
395 usb_free_urb(urb); in stk1160_free_isoc()
396 dev->isoc_ctl.urb[i] = NULL; in stk1160_free_isoc()
401 kfree(dev->isoc_ctl.urb); in stk1160_free_isoc()
404 dev->isoc_ctl.urb = NULL; in stk1160_free_isoc()
426 struct urb *urb; in stk1160_alloc_isoc() local
445 dev->isoc_ctl.urb = kzalloc(sizeof(void *)*num_bufs, GFP_KERNEL); in stk1160_alloc_isoc()
446 if (!dev->isoc_ctl.urb) { in stk1160_alloc_isoc()
455 kfree(dev->isoc_ctl.urb); in stk1160_alloc_isoc()
462 urb = usb_alloc_urb(max_packets, GFP_KERNEL); in stk1160_alloc_isoc()
463 if (!urb) { in stk1160_alloc_isoc()
467 dev->isoc_ctl.urb[i] = urb; in stk1160_alloc_isoc()
471 sb_size, GFP_KERNEL, &urb->transfer_dma); in stk1160_alloc_isoc()
489 urb->dev = dev->udev; in stk1160_alloc_isoc()
490 urb->pipe = usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO); in stk1160_alloc_isoc()
491 urb->transfer_buffer = dev->isoc_ctl.transfer_buffer[i]; in stk1160_alloc_isoc()
492 urb->transfer_buffer_length = sb_size; in stk1160_alloc_isoc()
493 urb->complete = stk1160_isoc_irq; in stk1160_alloc_isoc()
494 urb->context = dev; in stk1160_alloc_isoc()
495 urb->interval = 1; in stk1160_alloc_isoc()
496 urb->start_frame = 0; in stk1160_alloc_isoc()
497 urb->number_of_packets = max_packets; in stk1160_alloc_isoc()
499 urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; in stk1160_alloc_isoc()
501 urb->transfer_flags = URB_ISO_ASAP; in stk1160_alloc_isoc()
506 urb->iso_frame_desc[j].offset = k; in stk1160_alloc_isoc()
507 urb->iso_frame_desc[j].length = in stk1160_alloc_isoc()
526 usb_free_urb(dev->isoc_ctl.urb[i]); in stk1160_alloc_isoc()
527 dev->isoc_ctl.urb[i] = NULL; in stk1160_alloc_isoc()