Lines Matching refs:urbs
96 struct urb_list urbs; member
1141 up(&unode->dev->urbs.limit_sem); in ufx_release_urb_work()
1755 if (dev->urbs.count > 0) in ufx_usb_probe()
1788 if (dev->urbs.count > 0) in ufx_usb_disconnect()
1824 urb->transfer_buffer_length = dev->urbs.size; /* reset to actual */ in ufx_urb_completion()
1826 spin_lock_irqsave(&dev->urbs.lock, flags); in ufx_urb_completion()
1827 list_add_tail(&unode->entry, &dev->urbs.list); in ufx_urb_completion()
1828 dev->urbs.available++; in ufx_urb_completion()
1829 spin_unlock_irqrestore(&dev->urbs.lock, flags); in ufx_urb_completion()
1836 up(&dev->urbs.limit_sem); in ufx_urb_completion()
1841 int count = dev->urbs.count; in ufx_free_urb_list()
1853 ret = down_interruptible(&dev->urbs.limit_sem); in ufx_free_urb_list()
1857 spin_lock_irqsave(&dev->urbs.lock, flags); in ufx_free_urb_list()
1859 node = dev->urbs.list.next; /* have reserved one with sem */ in ufx_free_urb_list()
1862 spin_unlock_irqrestore(&dev->urbs.lock, flags); in ufx_free_urb_list()
1868 usb_free_coherent(urb->dev, dev->urbs.size, in ufx_free_urb_list()
1882 spin_lock_init(&dev->urbs.lock); in ufx_alloc_urb_list()
1884 dev->urbs.size = size; in ufx_alloc_urb_list()
1885 INIT_LIST_HEAD(&dev->urbs.list); in ufx_alloc_urb_list()
1916 list_add_tail(&unode->entry, &dev->urbs.list); in ufx_alloc_urb_list()
1921 sema_init(&dev->urbs.limit_sem, i); in ufx_alloc_urb_list()
1922 dev->urbs.count = i; in ufx_alloc_urb_list()
1923 dev->urbs.available = i; in ufx_alloc_urb_list()
1939 ret = down_timeout(&dev->urbs.limit_sem, GET_URB_TIMEOUT); in ufx_get_urb()
1943 ret, dev->urbs.available); in ufx_get_urb()
1947 spin_lock_irqsave(&dev->urbs.lock, flags); in ufx_get_urb()
1949 BUG_ON(list_empty(&dev->urbs.list)); /* reserved one with limit_sem */ in ufx_get_urb()
1950 entry = dev->urbs.list.next; in ufx_get_urb()
1952 dev->urbs.available--; in ufx_get_urb()
1954 spin_unlock_irqrestore(&dev->urbs.lock, flags); in ufx_get_urb()
1967 BUG_ON(len > dev->urbs.size); in ufx_submit_urb()