Lines Matching refs:urb
30 static void sd_isoc_irq(struct urb *urb);
74 struct urb *urb; in sd_start() local
84 urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); in sd_start()
85 if (!urb) in sd_start()
87 gspca_dev->urb[n] = urb; in sd_start()
88 urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, in sd_start()
91 &urb->transfer_dma); in sd_start()
93 if (urb->transfer_buffer == NULL) { in sd_start()
97 urb->dev = gspca_dev->dev; in sd_start()
98 urb->context = gspca_dev; in sd_start()
99 urb->transfer_buffer_length = SD_PKT_SZ * SD_NPKT; in sd_start()
100 urb->pipe = usb_rcvisocpipe(gspca_dev->dev, in sd_start()
102 urb->transfer_flags = URB_ISO_ASAP in sd_start()
104 urb->interval = 1; in sd_start()
105 urb->complete = sd_isoc_irq; in sd_start()
106 urb->number_of_packets = SD_NPKT; in sd_start()
108 urb->iso_frame_desc[i].length = SD_PKT_SZ; in sd_start()
109 urb->iso_frame_desc[i].offset = SD_PKT_SZ * i; in sd_start()
139 static void sd_isoc_irq(struct urb *urb) in sd_isoc_irq() argument
141 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; in sd_isoc_irq()
142 struct urb *urb0; in sd_isoc_irq()
149 if (urb->status != 0) { in sd_isoc_irq()
150 if (urb->status == -ESHUTDOWN) in sd_isoc_irq()
156 pr_err("urb status: %d\n", urb->status); in sd_isoc_irq()
161 if (urb == gspca_dev->urb[0] || urb == gspca_dev->urb[2]) in sd_isoc_irq()
165 if (urb == gspca_dev->urb[1]) in sd_isoc_irq()
166 urb0 = gspca_dev->urb[0]; in sd_isoc_irq()
168 urb0 = gspca_dev->urb[2]; in sd_isoc_irq()
169 for (i = 0; i < urb->number_of_packets; i++) { in sd_isoc_irq()
173 || urb->iso_frame_desc[i].actual_length != SD_PKT_SZ) { in sd_isoc_irq()
176 urb->iso_frame_desc[i].actual_length); in sd_isoc_irq()
182 st = urb->iso_frame_desc[i].status; in sd_isoc_irq()
222 data = (u8 *) urb->transfer_buffer in sd_isoc_irq()
223 + urb->iso_frame_desc[i].offset; in sd_isoc_irq()
232 st = usb_submit_urb(urb, GFP_ATOMIC); in sd_isoc_irq()