Home | History | Annotate | Download | only in os

Lines Matching full:urbs

78  * allows us to mark URBs as being part of a specific logical transfer when
80 * URBs within that transfer will be cancelled and no more URBs will be
83 * The BULK_CONTINUATION flag must be set on all URBs within a bulk transfer
85 * For IN transfers, we must also set SHORT_NOT_OK on all URBs except the
90 * reject such URBs).
95 * allows us to mark URBs that should be followed by a zero length data
133 /* one or more urbs encountered a low-level error */
139 struct usbfs_urb *urbs;
1524 /* URBs are discarded in reverse order of submission to avoid races. */
1540 urb = &tpriv->urbs[i];
1583 struct usbfs_urb *urbs;
1590 if (tpriv->urbs)
1597 /* usbfs places a 16kb limit on bulk URBs. we divide up larger requests
1610 usbi_dbg("need %d urbs for new transfer with length %d", num_urbs,
1613 urbs = malloc(alloc_size);
1614 if (!urbs)
1616 memset(urbs, 0, alloc_size);
1617 tpriv->urbs = urbs;
1624 struct usbfs_urb *urb = &urbs[i];
1660 free(urbs);
1661 tpriv->urbs = NULL;
1666 * tricky. we may need to discard all previous URBs. there are
1668 * - discarding is asynchronous - discarded urbs will be reaped
1670 * discarded URBs are reaped, otherwise libusb will be using
1672 * - the earlier URBs may have completed successfully and we do
1675 * this transfer simply didn't need all the URBs we submitted
1677 * in case of error we discard all previous URBs. later when
1683 /* The URBs we haven't submitted yet we count as already
1709 struct usbfs_urb **urbs;
1722 /* usbfs places a 32kb limit on iso URBs. we divide up larger requests
1727 /* calculate how many URBs we need */
1739 usbi_dbg("need %d 32k URBs for transfer", num_urbs);
1741 alloc_size = num_urbs * sizeof(*urbs);
1742 urbs = malloc(alloc_size);
1743 if (!urbs)
1745 memset(urbs, 0, alloc_size);
1747 tpriv->iso_urbs = urbs;
1785 urbs[i] = urb;
1803 /* submit URBs */
1805 int r = ioctl(dpriv->fd, IOCTL_USBFS_SUBMITURB, urbs[i]);
1824 * tricky. we must discard all previous URBs. there are
1826 * - discarding is asynchronous - discarded urbs will be reaped
1828 * discarded URBs are reaped, otherwise libusb will be using
1830 * - the earlier URBs may have completed successfully and we do
1832 * so, in this case we discard all the previous URBs BUT we report
1838 /* The URBs we haven't submitted yet we count as already
1862 if (tpriv->urbs)
1872 tpriv->urbs = urb;
1885 tpriv->urbs = NULL;
1939 if (!tpriv->urbs)
1951 /* urbs can be freed also in submit_transfer so lock mutex first */
1957 if (tpriv->urbs)
1958 free(tpriv->urbs);
1959 tpriv->urbs = NULL;
1979 int urb_idx = urb - tpriv->urbs;
1992 * we may receive some data in these URBs that we don't want to lose.
1998 * so we start cancelling the remaining URBs. however, we're too
2093 /* cancel remaining urbs and wait for their completion before
2102 free(tpriv->urbs);
2103 tpriv->urbs = NULL;
2246 free(tpriv->urbs);
2247 tpriv->urbs = NULL;
2287 free(tpriv->urbs);
2288 tpriv->urbs = NULL;