URB定义:
usb 请求块(usb request block, urb)是usb设备驱动中用来描述与usb设备通信所用的基本载体和核心数据结构,非常类似于网络设备驱动中的sk_buff结构体,是usb主机与设备通信的电波
- struct urb {
- /* private: usb core and host controller only fields in the urb */
- struct kref kref; /* URB引用计数 */
- void *hcpriv; /* host控制器的私有数据 */
- atomic_t use_count; /* 当前提交计数 */
- atomic_t reject; /* 提交失败计数 */
- int unlinked; /* 连接失败代码 */
- /* public: documented fields in the urb that can be used by drivers */
- struct list_head urb_list; /* list head for use by the urb's
- * current owner */
- struct list_head anchor_list; /* the URB may be anchored */
- struct usb_anchor *anchor;
- struct usb_device *dev; /* 指向这个 urb 要发送的目标 struct usb_device 的指针,这个变量必须在这个 urb 被发送到 USB 核心之前被 USB 驱动初始化.*/
- struct usb_host_endpoint *ep; /* (internal) poin