• Home
  • Raw
  • Download

Lines Matching refs:urb

70 	struct urb *urb[NUM_CPORT_IN_URB];  member
107 struct urb *cport_out_urb[NUM_CPORT_OUT_URB];
120 struct urb *arpc_urb[NUM_ARPC_IN_URB];
141 static void cport_out_callback(struct urb *urb);
171 static void ap_urb_complete(struct urb *urb) in ap_urb_complete() argument
173 struct usb_ctrlrequest *dr = urb->context; in ap_urb_complete()
176 usb_free_urb(urb); in ap_urb_complete()
182 struct urb *urb; in output_async() local
187 urb = usb_alloc_urb(0, GFP_ATOMIC); in output_async()
188 if (!urb) in output_async()
193 usb_free_urb(urb); in output_async()
206 usb_fill_control_urb(urb, udev, usb_sndctrlpipe(udev, 0), in output_async()
209 retval = usb_submit_urb(urb, GFP_ATOMIC); in output_async()
211 usb_free_urb(urb); in output_async()
231 struct urb *urb; in es2_cport_in_enable() local
236 urb = cport_in->urb[i]; in es2_cport_in_enable()
238 ret = usb_submit_urb(urb, GFP_KERNEL); in es2_cport_in_enable()
250 urb = cport_in->urb[i]; in es2_cport_in_enable()
251 usb_kill_urb(urb); in es2_cport_in_enable()
260 struct urb *urb; in es2_cport_in_disable() local
264 urb = cport_in->urb[i]; in es2_cport_in_disable()
265 usb_kill_urb(urb); in es2_cport_in_disable()
271 struct urb *urb; in es2_arpc_in_enable() local
276 urb = es2->arpc_urb[i]; in es2_arpc_in_enable()
278 ret = usb_submit_urb(urb, GFP_KERNEL); in es2_arpc_in_enable()
290 urb = es2->arpc_urb[i]; in es2_arpc_in_enable()
291 usb_kill_urb(urb); in es2_arpc_in_enable()
299 struct urb *urb; in es2_arpc_in_disable() local
303 urb = es2->arpc_urb[i]; in es2_arpc_in_disable()
304 usb_kill_urb(urb); in es2_arpc_in_disable()
308 static struct urb *next_free_urb(struct es2_ap_dev *es2, gfp_t gfp_mask) in next_free_urb()
310 struct urb *urb = NULL; in next_free_urb() local
321 urb = es2->cport_out_urb[i]; in next_free_urb()
326 if (urb) in next_free_urb()
327 return urb; in next_free_urb()
338 static void free_urb(struct es2_ap_dev *es2, struct urb *urb) in free_urb() argument
348 if (urb == es2->cport_out_urb[i]) { in free_urb()
350 urb = NULL; in free_urb()
357 usb_free_urb(urb); in free_urb()
397 struct urb *urb; in message_send() local
411 urb = next_free_urb(es2, gfp_mask); in message_send()
412 if (!urb) in message_send()
416 message->hcpriv = urb; in message_send()
424 usb_fill_bulk_urb(urb, udev, in message_send()
429 urb->transfer_flags |= URB_ZERO_PACKET; in message_send()
433 retval = usb_submit_urb(urb, gfp_mask); in message_send()
441 free_urb(es2, urb); in message_send()
457 struct urb *urb; in message_cancel() local
463 urb = message->hcpriv; in message_cancel()
466 usb_get_urb(urb); in message_cancel()
470 if (urb == es2->cport_out_urb[i]) { in message_cancel()
477 usb_kill_urb(urb); in message_cancel()
485 usb_free_urb(urb); in message_cancel()
750 static int check_urb_status(struct urb *urb) in check_urb_status() argument
752 struct device *dev = &urb->dev->dev; in check_urb_status()
753 int status = urb->status; in check_urb_status()
761 __func__, urb->actual_length); in check_urb_status()
779 struct urb *urb; in es2_destroy() local
787 urb = es2->cport_out_urb[i]; in es2_destroy()
788 usb_kill_urb(urb); in es2_destroy()
789 usb_free_urb(urb); in es2_destroy()
801 usb_free_urb(es2->cport_in.urb[i]); in es2_destroy()
816 static void cport_in_callback(struct urb *urb) in cport_in_callback() argument
818 struct gb_host_device *hd = urb->context; in cport_in_callback()
819 struct device *dev = &urb->dev->dev; in cport_in_callback()
821 int status = check_urb_status(urb); in cport_in_callback()
837 if (urb->actual_length < sizeof(*header)) { in cport_in_callback()
843 header = urb->transfer_buffer; in cport_in_callback()
847 greybus_data_rcvd(hd, cport_id, urb->transfer_buffer, in cport_in_callback()
848 urb->actual_length); in cport_in_callback()
854 retval = usb_submit_urb(urb, GFP_ATOMIC); in cport_in_callback()
859 static void cport_out_callback(struct urb *urb) in cport_out_callback() argument
861 struct gb_message *message = urb->context; in cport_out_callback()
864 int status = check_urb_status(urb); in cport_out_callback()
879 free_urb(es2, urb); in cport_out_callback()
1029 static void arpc_in_callback(struct urb *urb) in arpc_in_callback() argument
1031 struct es2_ap_dev *es2 = urb->context; in arpc_in_callback()
1032 struct device *dev = &urb->dev->dev; in arpc_in_callback()
1033 int status = check_urb_status(urb); in arpc_in_callback()
1051 if (urb->actual_length < sizeof(*resp)) { in arpc_in_callback()
1056 resp = urb->transfer_buffer; in arpc_in_callback()
1073 retval = usb_submit_urb(urb, GFP_ATOMIC); in arpc_in_callback()
1344 struct urb *urb; in ap_probe() local
1347 urb = usb_alloc_urb(0, GFP_KERNEL); in ap_probe()
1348 if (!urb) { in ap_probe()
1352 es2->cport_in.urb[i] = urb; in ap_probe()
1360 usb_fill_bulk_urb(urb, udev, in ap_probe()
1370 struct urb *urb; in ap_probe() local
1373 urb = usb_alloc_urb(0, GFP_KERNEL); in ap_probe()
1374 if (!urb) { in ap_probe()
1378 es2->arpc_urb[i] = urb; in ap_probe()
1386 usb_fill_bulk_urb(urb, udev, in ap_probe()
1397 struct urb *urb; in ap_probe() local
1399 urb = usb_alloc_urb(0, GFP_KERNEL); in ap_probe()
1400 if (!urb) { in ap_probe()
1405 es2->cport_out_urb[i] = urb; in ap_probe()