Lines Matching refs:urb
57 * with one or more transfer descriptors (TDs) per urb
1331 * urb->transfer_flags:
1338 #define URB_NO_TRANSFER_DMA_MAP 0x0004 /* urb->transfer_dma valid on submit */
1365 struct urb;
1383 typedef void (*usb_complete_t)(struct urb *);
1386 * struct urb - USB Request Block
1565 * when the urb is owned by the hcd, that is, since the call to
1568 struct urb {
1569 /* private: usb core and host controller only fields in the urb */
1576 /* public: documented fields in the urb that can be used by drivers */
1577 struct list_head urb_list; /* list head for use by the urb's
1610 * usb_fill_control_urb - initializes a control urb
1611 * @urb: pointer to the urb to initialize.
1612 * @dev: pointer to the struct usb_device for this urb.
1618 * @context: what to set the urb context to.
1620 * Initializes a control urb with the proper information needed to submit
1623 static inline void usb_fill_control_urb(struct urb *urb,
1632 urb->dev = dev;
1633 urb->pipe = pipe;
1634 urb->setup_packet = setup_packet;
1635 urb->transfer_buffer = transfer_buffer;
1636 urb->transfer_buffer_length = buffer_length;
1637 urb->complete = complete_fn;
1638 urb->context = context;
1642 * usb_fill_bulk_urb - macro to help initialize a bulk urb
1643 * @urb: pointer to the urb to initialize.
1644 * @dev: pointer to the struct usb_device for this urb.
1649 * @context: what to set the urb context to.
1651 * Initializes a bulk urb with the proper information needed to submit it
1654 static inline void usb_fill_bulk_urb(struct urb *urb,
1662 urb->dev = dev;
1663 urb->pipe = pipe;
1664 urb->transfer_buffer = transfer_buffer;
1665 urb->transfer_buffer_length = buffer_length;
1666 urb->complete = complete_fn;
1667 urb->context = context;
1671 * usb_fill_int_urb - macro to help initialize a interrupt urb
1672 * @urb: pointer to the urb to initialize.
1673 * @dev: pointer to the struct usb_device for this urb.
1678 * @context: what to set the urb context to.
1679 * @interval: what to set the urb interval to, encoded like
1682 * Initializes a interrupt urb with the proper information needed to submit
1695 static inline void usb_fill_int_urb(struct urb *urb,
1704 urb->dev = dev;
1705 urb->pipe = pipe;
1706 urb->transfer_buffer = transfer_buffer;
1707 urb->transfer_buffer_length = buffer_length;
1708 urb->complete = complete_fn;
1709 urb->context = context;
1715 urb->interval = 1 << (interval - 1);
1717 urb->interval = interval;
1720 urb->start_frame = -1;
1723 extern void usb_init_urb(struct urb *urb);
1724 extern struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags);
1725 extern void usb_free_urb(struct urb *urb);
1727 extern struct urb *usb_get_urb(struct urb *urb);
1728 extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
1729 extern int usb_unlink_urb(struct urb *urb);
1730 extern void usb_kill_urb(struct urb *urb);
1731 extern void usb_poison_urb(struct urb *urb);
1732 extern void usb_unpoison_urb(struct urb *urb);
1733 extern void usb_block_urb(struct urb *urb);
1740 extern void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor);
1741 extern void usb_unanchor_urb(struct urb *urb);
1744 extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor);
1752 * @urb: URB to be checked
1754 * Return: 1 if @urb describes an IN transfer (device-to-host),
1757 static inline int usb_urb_dir_in(struct urb *urb)
1759 return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN;
1764 * @urb: URB to be checked
1766 * Return: 1 if @urb describes an OUT transfer (host-to-device),
1769 static inline int usb_urb_dir_out(struct urb *urb)
1771 return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT;
1775 int usb_urb_ep_type_check(const struct urb *urb);
1783 struct urb *usb_buffer_map(struct urb *urb);
1784 void usb_buffer_dmasync(struct urb *urb);
1785 void usb_buffer_unmap(struct urb *urb);
1894 struct urb **urbs;