include\linux\usb.h
/**
* struct usb_host_endpoint - host-side endpoint descriptor and queue
* @desc: descriptor for this endpoint, wMaxPacketSize in native byteorder
* @ss_ep_comp: SuperSpeed companion descriptor for this endpoint
* @urb_list: urbs queued to this endpoint; maintained by usbcore
* @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)
* with one or more transfer descriptors (TDs) per urb
* @ep_dev: ep_device for sysfs info
* @extra: descriptors following this endpoint in the configuration
* @extralen: how many bytes of "extra" are valid
* @enabled: URBs may be submitted to this endpoint
* @streams: number of USB-3 streams allocated on the endpoint
*
* USB requests are always queued to a given endpoint, identified by a
* descriptor within an active interface in a given USB configuration.
*/
struct usb_host_endpoint {
struct usb_endpoint_descriptor desc; // 端点描述符,四大描述符的第二个隆重登场了
struct usb_ss_ep_comp_descriptor ss_ep_comp; // 端点高速配置描述
struct list_head urb_list; // urb_list,端点要处理的urb队列,包含了执行urb传输所需要的所有信息.urb可是usb通信的主角。和你的usb通信,就得创建一个urb,
// 并且为它赋好值,交给咱们的usb core
void *hcpriv; // 这是提供给HCD(host controller driver)用的。比如等时端点会在里边儿放一个ehci_iso_stream.这个我们以后碰到了在来讨论 (⊙﹏⊙)b
struct ep_device *ep_dev; /* For sysfs info */ // 这个字段是供sysfs用的
unsigned char *extra; /* Extra descriptors */ // 有关一些额外扩展的描述符的,和struct 里差不多,只是这里的是针对端点
//的,如果你请求从设备里获得描述符信息,它们会跟在标准的端点描述符后面返回给你。
int extralen;
int enabled;
int streams;
};
/* NOTE: these two are _only_ in audio endpoints. */
/* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
__u8 bRefresh;
__u8 bSynchAddress;
} __attribute__ ((packed));
#define USB_DT_ENDPOINT_SIZE 7
#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */