Lines Matching refs:urb

228 static void stk1160_process_isoc(struct stk1160 *dev, struct urb *urb)  in stk1160_process_isoc()  argument
238 if (urb->status < 0) { in stk1160_process_isoc()
240 print_err_status(dev, -1, urb->status); in stk1160_process_isoc()
244 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_process_isoc()
245 status = urb->iso_frame_desc[i].status; in stk1160_process_isoc()
252 p = urb->transfer_buffer + urb->iso_frame_desc[i].offset; in stk1160_process_isoc()
253 len = urb->iso_frame_desc[i].actual_length; in stk1160_process_isoc()
306 static void stk1160_isoc_irq(struct urb *urb) in stk1160_isoc_irq() argument
309 struct stk1160 *dev = urb->context; in stk1160_isoc_irq()
311 switch (urb->status) { in stk1160_isoc_irq()
320 stk1160_err("urb error! status %d\n", urb->status); in stk1160_isoc_irq()
324 stk1160_process_isoc(dev, urb); in stk1160_isoc_irq()
327 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_isoc_irq()
328 urb->iso_frame_desc[i].status = 0; in stk1160_isoc_irq()
329 urb->iso_frame_desc[i].actual_length = 0; in stk1160_isoc_irq()
332 rc = usb_submit_urb(urb, GFP_ATOMIC); in stk1160_isoc_irq()
361 usb_kill_urb(dev->isoc_ctl.urb[i]); in stk1160_cancel_isoc()
373 struct urb *urb; in stk1160_free_isoc() local
380 urb = dev->isoc_ctl.urb[i]; in stk1160_free_isoc()
381 if (urb) { in stk1160_free_isoc()
386 urb->transfer_buffer_length, in stk1160_free_isoc()
388 urb->transfer_dma); in stk1160_free_isoc()
393 usb_free_urb(urb); in stk1160_free_isoc()
394 dev->isoc_ctl.urb[i] = NULL; in stk1160_free_isoc()
399 kfree(dev->isoc_ctl.urb); in stk1160_free_isoc()
402 dev->isoc_ctl.urb = NULL; in stk1160_free_isoc()
424 struct urb *urb; in stk1160_alloc_isoc() local
443 dev->isoc_ctl.urb = kzalloc(sizeof(void *)*num_bufs, GFP_KERNEL); in stk1160_alloc_isoc()
444 if (!dev->isoc_ctl.urb) { in stk1160_alloc_isoc()
453 kfree(dev->isoc_ctl.urb); in stk1160_alloc_isoc()
460 urb = usb_alloc_urb(max_packets, GFP_KERNEL); in stk1160_alloc_isoc()
461 if (!urb) { in stk1160_alloc_isoc()
465 dev->isoc_ctl.urb[i] = urb; in stk1160_alloc_isoc()
469 sb_size, GFP_KERNEL, &urb->transfer_dma); in stk1160_alloc_isoc()
487 urb->dev = dev->udev; in stk1160_alloc_isoc()
488 urb->pipe = usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO); in stk1160_alloc_isoc()
489 urb->transfer_buffer = dev->isoc_ctl.transfer_buffer[i]; in stk1160_alloc_isoc()
490 urb->transfer_buffer_length = sb_size; in stk1160_alloc_isoc()
491 urb->complete = stk1160_isoc_irq; in stk1160_alloc_isoc()
492 urb->context = dev; in stk1160_alloc_isoc()
493 urb->interval = 1; in stk1160_alloc_isoc()
494 urb->start_frame = 0; in stk1160_alloc_isoc()
495 urb->number_of_packets = max_packets; in stk1160_alloc_isoc()
497 urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; in stk1160_alloc_isoc()
499 urb->transfer_flags = URB_ISO_ASAP; in stk1160_alloc_isoc()
504 urb->iso_frame_desc[j].offset = k; in stk1160_alloc_isoc()
505 urb->iso_frame_desc[j].length = in stk1160_alloc_isoc()
524 usb_free_urb(dev->isoc_ctl.urb[i]); in stk1160_alloc_isoc()
525 dev->isoc_ctl.urb[i] = NULL; in stk1160_alloc_isoc()