| /OK3568_Linux_fs/kernel/drivers/gpu/drm/udl/ |
| H A D | udl_main.c | 97 * Need to ensure a channel is selected before submitting URBs 127 up(&unode->dev->urbs.limit_sem); in udl_release_urb_work() 146 urb->transfer_buffer_length = udl->urbs.size; /* reset to actual */ in udl_urb_completion() 148 spin_lock_irqsave(&udl->urbs.lock, flags); in udl_urb_completion() 149 list_add_tail(&unode->entry, &udl->urbs.list); in udl_urb_completion() 150 udl->urbs.available++; in udl_urb_completion() 151 spin_unlock_irqrestore(&udl->urbs.lock, flags); in udl_urb_completion() 162 up(&udl->urbs.limit_sem); in udl_urb_completion() 168 int count = udl->urbs.count; in udl_free_urb_list() 173 DRM_DEBUG("Waiting for completes and freeing all render urbs\n"); in udl_free_urb_list() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/usb/ |
| H A D | anchors.rst | 9 driver has to keep track of the URBs it has submitted 12 keeping track of URBs and provides methods to deal with 13 multiple URBs. 25 Once it has no more URBs associated with it, the anchor can be 28 Association and disassociation of URBs with anchors 31 An association of URBs to an anchor is made by an explicit 35 all URBs associated with an anchor. 38 Operations on multitudes of URBs 44 This function kills all URBs associated with an anchor. The URBs 52 This function unlinks all URBs associated with an anchor. The URBs [all …]
|
| H A D | callbacks.rst | 8 structure and through the completion handler of URBs a driver submits. 104 If you are called due to a physical disconnection, all your URBs will be 121 outstanding URBs to complete, and save any device state you need to 122 restore. No more URBs may be submitted until the post_reset method
|
| /OK3568_Linux_fs/kernel/drivers/usb/usbip/ |
| H A D | stub_rx.c | 199 * process coming urbs. Even if the urb is unlinked, its completion 253 ret = usb_unlink_urb(priv->urbs[i]); in stub_recv_cmd_unlink() 255 dev_err(&priv->urbs[i]->dev->dev, in stub_recv_cmd_unlink() 447 ret = usbip_recv_xbuff(ud, priv->urbs[i]); in stub_recv_xbuff() 502 * a single SG request into several URBs and map in stub_recv_cmd_submit() 509 * several URBs. Later, priv->sgl is used by in stub_recv_cmd_submit() 511 * reassemble the divied URBs. in stub_recv_cmd_submit() 528 priv->urbs = kmalloc_array(num_urbs, sizeof(*priv->urbs), GFP_KERNEL); in stub_recv_cmd_submit() 529 if (!priv->urbs) in stub_recv_cmd_submit() 537 priv->urbs[0] = usb_alloc_urb(np, GFP_KERNEL); in stub_recv_cmd_submit() [all …]
|
| H A D | stub_tx.c | 75 * If the server breaks single SG request into the several URBs, the in stub_complete() 76 * URBs must be reassembled before sending completed URB to the vhci. in stub_complete() 77 * Don't wake up the tx thread until all the URBs are completed. in stub_complete() 161 struct urb *urb = priv->urbs[0]; in stub_send_ret_submit() 209 actual_length += priv->urbs[i]->actual_length; in stub_send_ret_submit() 225 * URBs because the server's HCD doesn't support SG, in stub_send_ret_submit() 231 priv->urbs[i]->transfer_buffer; in stub_send_ret_submit() 233 priv->urbs[i]->actual_length; in stub_send_ret_submit()
|
| /OK3568_Linux_fs/kernel/drivers/net/can/usb/ |
| H A D | ucan.c | 259 /* Context Information for transmission URBs */ 858 static void ucan_cleanup_rx_urbs(struct ucan_priv *up, struct urb **urbs) in ucan_cleanup_rx_urbs() argument 863 if (urbs[i]) { in ucan_cleanup_rx_urbs() 864 usb_unanchor_urb(urbs[i]); in ucan_cleanup_rx_urbs() 867 urbs[i]->transfer_buffer, in ucan_cleanup_rx_urbs() 868 urbs[i]->transfer_dma); in ucan_cleanup_rx_urbs() 869 usb_free_urb(urbs[i]); in ucan_cleanup_rx_urbs() 873 memset(urbs, 0, sizeof(*urbs) * UCAN_MAX_RX_URBS); in ucan_cleanup_rx_urbs() 877 struct urb **urbs) in ucan_prepare_and_anchor_rx_urbs() argument 881 memset(urbs, 0, sizeof(*urbs) * UCAN_MAX_RX_URBS); in ucan_prepare_and_anchor_rx_urbs() [all …]
|
| /OK3568_Linux_fs/kernel/sound/usb/caiaq/ |
| H A D | audio.c | 700 struct urb **urbs; in alloc_urbs() local 708 urbs = kmalloc_array(N_URBS, sizeof(*urbs), GFP_KERNEL); in alloc_urbs() 709 if (!urbs) { in alloc_urbs() 715 urbs[i] = usb_alloc_urb(FRAMES_PER_URB, GFP_KERNEL); in alloc_urbs() 716 if (!urbs[i]) { in alloc_urbs() 718 return urbs; in alloc_urbs() 721 urbs[i]->transfer_buffer = in alloc_urbs() 724 if (!urbs[i]->transfer_buffer) { in alloc_urbs() 726 return urbs; in alloc_urbs() 731 &urbs[i]->iso_frame_desc[frame]; in alloc_urbs() [all …]
|
| /OK3568_Linux_fs/kernel/sound/usb/ |
| H A D | endpoint.c | 30 * There are functions to activate and deactivate the streaming URBs and 49 * only the first user will effectively start the URBs, and only the last 50 * one to stop it will tear the URBs down again. 321 * Send output urbs that have been prepared previously. URBs are dequeued 326 * The reason why the functionality of sending and preparing URBs is separated 331 * driven by dedicated sync endpoints, URBs are immediately re-submitted 379 * complete callback for urbs 535 * wait until all urbs are processed. 552 "timeout: still %d active urbs on EP #%x\n", in wait_clear_urbs() 574 * unlink active urbs. [all …]
|
| H A D | midi.c | 141 } urbs[OUTPUT_URBS]; member 171 struct urb *urbs[INPUT_URBS]; member 287 urb_index = context - ep->urbs; in snd_usbmidi_out_urb_complete() 325 urb = ep->urbs[urb_index].urb; in snd_usbmidi_do_output() 371 if (atomic_read(&in->urbs[j]->use_count)) in snd_usbmidi_error_timer() 373 in->urbs[j]->dev = umidi->dev; in snd_usbmidi_error_timer() 374 snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC); in snd_usbmidi_error_timer() 392 if (ep->urbs[0].urb) in send_bulk_static_data() 393 err = usb_bulk_msg(ep->umidi->dev, ep->urbs[0].urb->pipe, in send_bulk_static_data() 1198 * currently active URBs, so we have to wait for those to complete. in snd_usbmidi_output_drain() [all …]
|
| H A D | card.h | 11 #define SYNC_URBS 4 /* always four urbs for sync */ 82 unsigned int nurbs; /* # urbs */ 83 unsigned long active_mask; /* bitmask of active urbs */ 84 unsigned long unlink_mask; /* bitmask of unlinked urbs */ 85 char *syncbuf; /* sync buffer for all sync URBs */
|
| /OK3568_Linux_fs/kernel/sound/usb/line6/ |
| H A D | pcm.c | 96 Unlink all currently active URBs. 106 usb_unlink_urb(pcms->urbs[i]); in line6_unlink_audio_urbs() 112 Wait until unlinking of all currently active URBs has been finished. 134 "timeout: still %d active urbs..\n", alive); in line6_wait_clear_audio_urbs() 193 /* Submit all currently available URBs */ in line6_stream_start() 206 /* stop a PCM stream; this doesn't sync with the unlinked URBs */ 456 if (pcms->urbs == NULL) in cleanup_urbs() 460 if (pcms->urbs[i]) { in cleanup_urbs() 461 usb_kill_urb(pcms->urbs[i]); in cleanup_urbs() 462 usb_free_urb(pcms->urbs[i]); in cleanup_urbs() [all …]
|
| H A D | capture.c | 36 urb_in = line6pcm->in.urbs[index]; in submit_audio_in_urb() 65 Submit all currently available capture URBs. 156 if (urb == line6pcm->in.urbs[index]) in audio_in_callback() 262 line6pcm->in.urbs = kcalloc(line6->iso_buffers, sizeof(struct urb *), in line6_create_audio_in_urbs() 264 if (line6pcm->in.urbs == NULL) in line6_create_audio_in_urbs() 267 /* create audio URBs and fill in constant values: */ in line6_create_audio_in_urbs() 272 urb = line6pcm->in.urbs[i] = in line6_create_audio_in_urbs()
|
| H A D | playback.c | 163 urb_out = line6pcm->out.urbs[index]; in submit_audio_out_urb() 283 Submit all currently available playback URBs. 321 if (urb == line6pcm->out.urbs[index]) in audio_out_callback() 407 line6pcm->out.urbs = kcalloc(line6->iso_buffers, sizeof(struct urb *), in line6_create_audio_out_urbs() 409 if (line6pcm->out.urbs == NULL) in line6_create_audio_out_urbs() 412 /* create audio URBs and fill in constant values: */ in line6_create_audio_out_urbs() 417 urb = line6pcm->out.urbs[i] = in line6_create_audio_out_urbs()
|
| H A D | pcm.h | 88 /* allocated URBs */ 89 struct urb **urbs; member 117 /* Bit mask of active URBs */ 120 /* Bit mask of URBs currently being unlinked */
|
| /OK3568_Linux_fs/kernel/drivers/media/usb/gspca/ |
| H A D | benq.c | 77 /* create 4 URBs - 2 on endpoint 0x83 and 2 on 0x082 */ in sd_start() 79 #error "Not enough URBs in the gspca table" in sd_start() 164 /* scan both received URBs */ in sd_isoc_irq() 191 * The images are received in URBs of different endpoints in sd_isoc_irq() 193 * Image pieces in URBs of ep 0x83 are continuated in URBs of in sd_isoc_irq() 195 * The packets in the URBs of endpoint 0x83 start with: in sd_isoc_irq() 228 /* resubmit the URBs */ in sd_isoc_irq()
|
| /OK3568_Linux_fs/kernel/drivers/video/fbdev/ |
| H A D | udlfb.c | 79 /* dlfb keeps a list of urbs for efficient bulk transfers */ 405 * rendering can be done directly to output buffers (e.g. USB URBs). 1798 /* When non-active we'll update virtual framebuffer, but no new urbs */ in dlfb_usb_disconnect() 1801 /* this function will wait for all in-flight urbs to complete */ in dlfb_usb_disconnect() 1844 urb->transfer_buffer_length = dlfb->urbs.size; /* reset to actual */ in dlfb_urb_completion() 1846 spin_lock_irqsave(&dlfb->urbs.lock, flags); in dlfb_urb_completion() 1847 list_add_tail(&unode->entry, &dlfb->urbs.list); in dlfb_urb_completion() 1848 dlfb->urbs.available++; in dlfb_urb_completion() 1849 spin_unlock_irqrestore(&dlfb->urbs.lock, flags); in dlfb_urb_completion() 1851 up(&dlfb->urbs.limit_sem); in dlfb_urb_completion() [all …]
|
| H A D | smscufx.c | 96 struct urb_list urbs; member 132 /* ufx keeps a list of urbs for efficient bulk transfers */ 1141 up(&unode->dev->urbs.limit_sem); in ufx_release_urb_work() 1762 /* When non-active we'll update virtual framebuffer, but no new urbs */ in ufx_usb_disconnect() 1771 /* this function will wait for all in-flight urbs to complete */ in ufx_usb_disconnect() 1772 if (dev->urbs.count > 0) in ufx_usb_disconnect() 1808 urb->transfer_buffer_length = dev->urbs.size; /* reset to actual */ in ufx_urb_completion() 1810 spin_lock_irqsave(&dev->urbs.lock, flags); in ufx_urb_completion() 1811 list_add_tail(&unode->entry, &dev->urbs.list); in ufx_urb_completion() 1812 dev->urbs.available++; in ufx_urb_completion() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/usb/core/ |
| H A D | urb.c | 106 * for urbs. 123 * This can be called to have access to URBs which are to be executed 242 * URBs may be submitted in interrupt context. 260 * interrupt and isochronous urbs, as part of successful URB submission 262 * (normally some power of two units). And for isochronous urbs, 295 * URBs may be submitted to endpoints before previous ones complete, to 596 * This routine cancels an in-progress request. URBs complete only once 633 * Host Controller Drivers (HCDs) place all the URBs for a particular 638 * will not restart until all its unlinked URBs have been fully retired, 658 * unlinking all pending URBs at the first fault. [all …]
|
| H A D | message.c | 358 * users are forced to abuse this routine by using it to submit URBs for 399 if (io->urbs) { in sg_clean() 401 usb_free_urb(io->urbs[io->entries]); in sg_clean() 402 kfree(io->urbs); in sg_clean() 403 io->urbs = NULL; in sg_clean() 418 * device driver code (like this routine) unlink queued urbs first, in sg_complete() 444 /* the previous urbs, and this one, completed already. in sg_complete() 445 * unlink pending urbs so they won't rx/tx bad data. in sg_complete() 450 if (!io->urbs[i]) in sg_complete() 453 usb_block_urb(io->urbs[i]); in sg_complete() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/usb/stk1160/ |
| H A D | stk1160-video.c | 327 * Cancel urbs 341 stk1160_dbg("killing %d urbs...\n", num_bufs); in stk1160_cancel_isoc() 346 * To kill urbs we can't be in atomic context. in stk1160_cancel_isoc() 353 stk1160_dbg("all urbs killed\n"); in stk1160_cancel_isoc() 399 * Helper for cancelling and freeing urbs 409 * Allocate URBs 424 stk1160_dbg("allocating urbs...\n"); in stk1160_alloc_isoc() 446 /* allocate urbs and transfer buffers */ in stk1160_alloc_isoc() 498 stk1160_dbg("%d urbs allocated\n", num_bufs); in stk1160_alloc_isoc() 514 stk1160_warn("%d urbs allocated. Trying to continue...\n", i - 1); in stk1160_alloc_isoc()
|
| /OK3568_Linux_fs/kernel/drivers/usb/misc/ |
| H A D | usbtest.c | 90 * urbs and buffers are allocated dynamically, 115 /* set up all urbs so they can be used with either bulk or interrupt */ 247 * These just package urbs as requests that can be easily canceled. 1220 /* allocate and init the urbs we'll queue. in test_ctrl_queue() 1385 /* queue the urbs */ in test_ctrl_queue() 1479 /* we can't unlink urbs while they're completing in unlink1() 1531 struct urb **urbs; member 1541 if (urb == ctx->urbs[ctx->num - 4] || urb == ctx->urbs[ctx->num - 2]) { in unlink_queued_callback() 1574 /* Allocate and init the urbs we'll queue */ in unlink_queued() 1575 ctx.urbs = kcalloc(num, sizeof(struct urb *), GFP_KERNEL); in unlink_queued() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/wireless/zydas/zd1211rw/ |
| H A D | zd_usb.c | 750 struct urb **urbs; in __zd_usb_enable_rx() local 755 urbs = kcalloc(RX_URBS_COUNT, sizeof(struct urb *), GFP_KERNEL); in __zd_usb_enable_rx() 756 if (!urbs) in __zd_usb_enable_rx() 759 urbs[i] = alloc_rx_urb(usb); in __zd_usb_enable_rx() 760 if (!urbs[i]) in __zd_usb_enable_rx() 766 if (rx->urbs) { in __zd_usb_enable_rx() 771 rx->urbs = urbs; in __zd_usb_enable_rx() 776 r = usb_submit_urb(urbs[i], GFP_KERNEL); in __zd_usb_enable_rx() 784 usb_kill_urb(urbs[i]); in __zd_usb_enable_rx() 787 rx->urbs = NULL; in __zd_usb_enable_rx() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/usb/au0828/ |
| H A D | au0828-dvb.c | 176 if (dev->urbs[i]) { in stop_urb_transfer() 177 usb_kill_urb(dev->urbs[i]); in stop_urb_transfer() 179 kfree(dev->urbs[i]->transfer_buffer); in stop_urb_transfer() 181 usb_free_urb(dev->urbs[i]); in stop_urb_transfer() 202 dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); in start_urb_transfer() 203 if (!dev->urbs[i]) in start_urb_transfer() 206 purb = dev->urbs[i]; in start_urb_transfer() 216 dev->urbs[i] = NULL; in start_urb_transfer() 236 ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC); in start_urb_transfer()
|
| /OK3568_Linux_fs/kernel/drivers/usb/atm/ |
| H A D | usbatm.c | 38 * - unlink all active send urbs of a vcc that is being closed. 105 "Number of urbs used for reception (range: 0-" 111 "Number of urbs used for transmission (range: 0-" 193 ** urbs ** 938 /* submit all rx URBs */ in usbatm_atm_init() 940 usbatm_submit_urb(instance->urbs[i]); in usbatm_atm_init() 1117 /* initialize urbs */ in usbatm_usb_probe() 1132 instance->urbs[i] = urb; in usbatm_usb_probe() 1154 /* put all tx URBs on the list of spares */ in usbatm_usb_probe() 1193 if (instance->urbs[i]) in usbatm_usb_probe() [all …]
|
| /OK3568_Linux_fs/kernel/sound/usb/misc/ |
| H A D | ua101.c | 116 } *urbs[MAX_QUEUE_LENGTH]; member 267 * and capture URBs must have been completed. Since the USB core does in playback_work() 269 * called alternately, we use two FIFOs for packet sizes and read URBs; in playback_work() 270 * submitting playback URBs is possible as long as both FIFOs are in playback_work() 437 int err = usb_submit_urb(&stream->urbs[i]->urb, GFP_KERNEL); in submit_stream_urbs() 452 if (stream->urbs[i]) in kill_stream_urbs() 453 usb_kill_urb(&stream->urbs[i]->urb); in kill_stream_urbs() 518 ua->capture.urbs[0]->urb.complete = first_capture_urb_complete; in start_usb_capture() 560 ua->playback.urbs[0]->urb.complete = in start_usb_playback() 567 * We submit the initial URBs all at once, so we have to wait for the in start_usb_playback() [all …]
|