Lines Matching full:urbs
81 /* dlfb keeps a list of urbs for efficient bulk transfers */
412 * rendering can be done directly to output buffers (e.g. USB URBs).
1750 /* When non-active we'll update virtual framebuffer, but no new urbs */ in dlfb_usb_disconnect()
1753 /* this function will wait for all in-flight urbs to complete */ in dlfb_usb_disconnect()
1796 urb->transfer_buffer_length = dlfb->urbs.size; /* reset to actual */ in dlfb_urb_completion()
1798 spin_lock_irqsave(&dlfb->urbs.lock, flags); in dlfb_urb_completion()
1799 list_add_tail(&unode->entry, &dlfb->urbs.list); in dlfb_urb_completion()
1800 dlfb->urbs.available++; in dlfb_urb_completion()
1801 spin_unlock_irqrestore(&dlfb->urbs.lock, flags); in dlfb_urb_completion()
1803 up(&dlfb->urbs.limit_sem); in dlfb_urb_completion()
1808 int count = dlfb->urbs.count; in dlfb_free_urb_list()
1815 down(&dlfb->urbs.limit_sem); in dlfb_free_urb_list()
1817 spin_lock_irq(&dlfb->urbs.lock); in dlfb_free_urb_list()
1819 node = dlfb->urbs.list.next; /* have reserved one with sem */ in dlfb_free_urb_list()
1822 spin_unlock_irq(&dlfb->urbs.lock); in dlfb_free_urb_list()
1828 usb_free_coherent(urb->dev, dlfb->urbs.size, in dlfb_free_urb_list()
1834 dlfb->urbs.count = 0; in dlfb_free_urb_list()
1844 spin_lock_init(&dlfb->urbs.lock); in dlfb_alloc_urb_list()
1847 dlfb->urbs.size = size; in dlfb_alloc_urb_list()
1848 INIT_LIST_HEAD(&dlfb->urbs.list); in dlfb_alloc_urb_list()
1850 sema_init(&dlfb->urbs.limit_sem, 0); in dlfb_alloc_urb_list()
1851 dlfb->urbs.count = 0; in dlfb_alloc_urb_list()
1852 dlfb->urbs.available = 0; in dlfb_alloc_urb_list()
1854 while (dlfb->urbs.count * size < wanted_size) { in dlfb_alloc_urb_list()
1886 list_add_tail(&unode->entry, &dlfb->urbs.list); in dlfb_alloc_urb_list()
1888 up(&dlfb->urbs.limit_sem); in dlfb_alloc_urb_list()
1889 dlfb->urbs.count++; in dlfb_alloc_urb_list()
1890 dlfb->urbs.available++; in dlfb_alloc_urb_list()
1893 return dlfb->urbs.count; in dlfb_alloc_urb_list()
1903 ret = down_timeout(&dlfb->urbs.limit_sem, GET_URB_TIMEOUT); in dlfb_get_urb()
1908 ret, dlfb->urbs.available); in dlfb_get_urb()
1912 spin_lock_irq(&dlfb->urbs.lock); in dlfb_get_urb()
1914 BUG_ON(list_empty(&dlfb->urbs.list)); /* reserved one with limit_sem */ in dlfb_get_urb()
1915 entry = dlfb->urbs.list.next; in dlfb_get_urb()
1917 dlfb->urbs.available--; in dlfb_get_urb()
1919 spin_unlock_irq(&dlfb->urbs.lock); in dlfb_get_urb()
1929 BUG_ON(len > dlfb->urbs.size); in dlfb_submit_urb()