Lines Matching refs:tpriv

1321 static void free_iso_urbs(struct linux_transfer_priv *tpriv)  in free_iso_urbs()  argument
1324 for (i = 0; i < tpriv->num_urbs; i++) { in free_iso_urbs()
1325 struct usbfs_urb *urb = tpriv->iso_urbs[i]; in free_iso_urbs()
1331 free(tpriv->iso_urbs); in free_iso_urbs()
1332 tpriv->iso_urbs = NULL; in free_iso_urbs()
1340 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in submit_bulk_transfer() local
1350 if (tpriv->urbs) in submit_bulk_transfer()
1373 tpriv->urbs = urbs; in submit_bulk_transfer()
1374 tpriv->num_urbs = num_urbs; in submit_bulk_transfer()
1375 tpriv->num_retired = 0; in submit_bulk_transfer()
1376 tpriv->reap_action = NORMAL; in submit_bulk_transfer()
1413 tpriv->urbs = NULL; in submit_bulk_transfer()
1430 tpriv->reap_action = SUBMIT_FAILED; in submit_bulk_transfer()
1434 tpriv->num_retired += num_urbs - i; in submit_bulk_transfer()
1455 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in submit_iso_transfer() local
1468 if (tpriv->iso_urbs) in submit_iso_transfer()
1496 tpriv->iso_urbs = urbs; in submit_iso_transfer()
1497 tpriv->num_urbs = num_urbs; in submit_iso_transfer()
1498 tpriv->num_retired = 0; in submit_iso_transfer()
1499 tpriv->reap_action = NORMAL; in submit_iso_transfer()
1500 tpriv->iso_packet_offset = 0; in submit_iso_transfer()
1530 free_iso_urbs(tpriv); in submit_iso_transfer()
1570 free_iso_urbs(tpriv); in submit_iso_transfer()
1587 tpriv->reap_action = SUBMIT_FAILED; in submit_iso_transfer()
1591 tpriv->num_retired = num_urbs - i; in submit_iso_transfer()
1610 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in submit_control_transfer() local
1618 if (tpriv->urbs) in submit_control_transfer()
1628 tpriv->urbs = urb; in submit_control_transfer()
1629 tpriv->reap_action = NORMAL; in submit_control_transfer()
1640 tpriv->urbs = NULL; in submit_control_transfer()
1674 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in cancel_control_transfer() local
1681 if (!tpriv->urbs) in cancel_control_transfer()
1684 tpriv->reap_action = CANCELLED; in cancel_control_transfer()
1685 r = ioctl(dpriv->fd, IOCTL_USBFS_DISCARDURB, tpriv->urbs); in cancel_control_transfer()
1702 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in cancel_bulk_transfer() local
1709 if (!tpriv->urbs) in cancel_bulk_transfer()
1712 tpriv->reap_action = CANCELLED; in cancel_bulk_transfer()
1713 for (i = 0; i < tpriv->num_urbs; i++) { in cancel_bulk_transfer()
1714 int tmp = ioctl(dpriv->fd, IOCTL_USBFS_DISCARDURB, &tpriv->urbs[i]); in cancel_bulk_transfer()
1724 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in cancel_iso_transfer() local
1731 if (!tpriv->iso_urbs) in cancel_iso_transfer()
1734 tpriv->reap_action = CANCELLED; in cancel_iso_transfer()
1735 for (i = 0; i < tpriv->num_urbs; i++) { in cancel_iso_transfer()
1736 int tmp = ioctl(dpriv->fd, IOCTL_USBFS_DISCARDURB, tpriv->iso_urbs[i]); in cancel_iso_transfer()
1768 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in op_clear_transfer_priv() local
1774 free(tpriv->urbs); in op_clear_transfer_priv()
1775 tpriv->urbs = NULL; in op_clear_transfer_priv()
1778 free_iso_urbs(tpriv); in op_clear_transfer_priv()
1789 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in handle_bulk_completion() local
1790 int num_urbs = tpriv->num_urbs; in handle_bulk_completion()
1791 int urb_idx = urb - tpriv->urbs; in handle_bulk_completion()
1799 tpriv->num_retired++; in handle_bulk_completion()
1801 if (tpriv->reap_action != NORMAL) { in handle_bulk_completion()
1834 if (tpriv->num_retired == num_urbs) { in handle_bulk_completion()
1836 if (tpriv->reap_action == CANCELLED) { in handle_bulk_completion()
1837 free(tpriv->urbs); in handle_bulk_completion()
1838 tpriv->urbs = NULL; in handle_bulk_completion()
1843 if (tpriv->reap_action != COMPLETED_EARLY) in handle_bulk_completion()
1898 tpriv->reap_action = COMPLETED_EARLY; in handle_bulk_completion()
1899 for (i = urb_idx + 1; i < tpriv->num_urbs; i++) { in handle_bulk_completion()
1902 if (tpriv->urbs[i].flags & USBFS_URB_BULK_CONTINUATION) in handle_bulk_completion()
1904 int tmp = ioctl(dpriv->fd, IOCTL_USBFS_DISCARDURB, &tpriv->urbs[i]); in handle_bulk_completion()
1915 free(tpriv->urbs); in handle_bulk_completion()
1916 tpriv->urbs = NULL; in handle_bulk_completion()
1929 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in handle_iso_completion() local
1930 int num_urbs = tpriv->num_urbs; in handle_iso_completion()
1936 if (urb == tpriv->iso_urbs[i]) { in handle_iso_completion()
1956 &transfer->iso_packet_desc[tpriv->iso_packet_offset++]; in handle_iso_completion()
1962 tpriv->num_retired++; in handle_iso_completion()
1964 if (tpriv->reap_action != NORMAL) { /* cancelled or submit_fail */ in handle_iso_completion()
1967 if (tpriv->num_retired == num_urbs) { in handle_iso_completion()
1969 free_iso_urbs(tpriv); in handle_iso_completion()
1970 if (tpriv->reap_action == CANCELLED) { in handle_iso_completion()
2000 free_iso_urbs(tpriv); in handle_iso_completion()
2013 struct linux_transfer_priv *tpriv = usbi_transfer_get_os_priv(itransfer); in handle_control_completion() local
2022 if (tpriv->reap_action == CANCELLED) { in handle_control_completion()
2026 free(tpriv->urbs); in handle_control_completion()
2027 tpriv->urbs = NULL; in handle_control_completion()
2054 free(tpriv->urbs); in handle_control_completion()
2055 tpriv->urbs = NULL; in handle_control_completion()