• Home
  • Raw
  • Download

Lines Matching refs:urb

217 static void stk1160_process_isoc(struct stk1160 *dev, struct urb *urb)  in stk1160_process_isoc()  argument
227 if (urb->status < 0) { in stk1160_process_isoc()
229 print_err_status(dev, -1, urb->status); in stk1160_process_isoc()
233 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_process_isoc()
234 status = urb->iso_frame_desc[i].status; in stk1160_process_isoc()
241 p = urb->transfer_buffer + urb->iso_frame_desc[i].offset; in stk1160_process_isoc()
242 len = urb->iso_frame_desc[i].actual_length; in stk1160_process_isoc()
295 static void stk1160_isoc_irq(struct urb *urb) in stk1160_isoc_irq() argument
298 struct stk1160 *dev = urb->context; in stk1160_isoc_irq()
300 switch (urb->status) { in stk1160_isoc_irq()
309 stk1160_err("urb error! status %d\n", urb->status); in stk1160_isoc_irq()
313 stk1160_process_isoc(dev, urb); in stk1160_isoc_irq()
316 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_isoc_irq()
317 urb->iso_frame_desc[i].status = 0; in stk1160_isoc_irq()
318 urb->iso_frame_desc[i].actual_length = 0; in stk1160_isoc_irq()
321 rc = usb_submit_urb(urb, GFP_ATOMIC); in stk1160_isoc_irq()
350 usb_kill_urb(dev->isoc_ctl.urb[i]); in stk1160_cancel_isoc()
362 struct urb *urb; in stk1160_free_isoc() local
369 urb = dev->isoc_ctl.urb[i]; in stk1160_free_isoc()
370 if (urb) { in stk1160_free_isoc()
375 urb->transfer_buffer_length, in stk1160_free_isoc()
377 urb->transfer_dma); in stk1160_free_isoc()
382 usb_free_urb(urb); in stk1160_free_isoc()
383 dev->isoc_ctl.urb[i] = NULL; in stk1160_free_isoc()
388 kfree(dev->isoc_ctl.urb); in stk1160_free_isoc()
391 dev->isoc_ctl.urb = NULL; in stk1160_free_isoc()
413 struct urb *urb; in stk1160_alloc_isoc() local
432 dev->isoc_ctl.urb = kcalloc(num_bufs, sizeof(void *), GFP_KERNEL); in stk1160_alloc_isoc()
433 if (!dev->isoc_ctl.urb) { in stk1160_alloc_isoc()
442 kfree(dev->isoc_ctl.urb); in stk1160_alloc_isoc()
449 urb = usb_alloc_urb(max_packets, GFP_KERNEL); in stk1160_alloc_isoc()
450 if (!urb) in stk1160_alloc_isoc()
452 dev->isoc_ctl.urb[i] = urb; in stk1160_alloc_isoc()
456 sb_size, GFP_KERNEL, &urb->transfer_dma); in stk1160_alloc_isoc()
474 urb->dev = dev->udev; in stk1160_alloc_isoc()
475 urb->pipe = usb_rcvisocpipe(dev->udev, STK1160_EP_VIDEO); in stk1160_alloc_isoc()
476 urb->transfer_buffer = dev->isoc_ctl.transfer_buffer[i]; in stk1160_alloc_isoc()
477 urb->transfer_buffer_length = sb_size; in stk1160_alloc_isoc()
478 urb->complete = stk1160_isoc_irq; in stk1160_alloc_isoc()
479 urb->context = dev; in stk1160_alloc_isoc()
480 urb->interval = 1; in stk1160_alloc_isoc()
481 urb->start_frame = 0; in stk1160_alloc_isoc()
482 urb->number_of_packets = max_packets; in stk1160_alloc_isoc()
484 urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; in stk1160_alloc_isoc()
486 urb->transfer_flags = URB_ISO_ASAP; in stk1160_alloc_isoc()
491 urb->iso_frame_desc[j].offset = k; in stk1160_alloc_isoc()
492 urb->iso_frame_desc[j].length = in stk1160_alloc_isoc()
511 usb_free_urb(dev->isoc_ctl.urb[i]); in stk1160_alloc_isoc()
512 dev->isoc_ctl.urb[i] = NULL; in stk1160_alloc_isoc()