USB_EP_XDESCR(9S) Data Structures for Drivers USB_EP_XDESCR(9S)

usb_ep_xdescr, usb_ep_xdescr_t
extended endpoint descriptor

#include <sys/usb/usba.h>

illumos DDI Specific

The usb_ep_xdescr_t structure is used to describe an endpoint descriptor as well account for the continuing evolutions in the USB specification.

Starting with the USB 3.0 specification, USB 3.0 endpoints have an endpoint SuperSpeed companion descriptor. See usb_ep_ss_comp_descr(9S) for a description of the descriptor. In the USB 3.1 specification, certain endpoints will have additional companion descriptors.

The usb_ep_xdescr_t structure, combined with the usb_ep_xdescr_fill(9F) and usb_pipe_xopen(9F) are designed to abstract away the need for USB client device drivers to need to be updated in the face of these newer endpoints, whose information is required for host controller devices to properly program the device.

After looking up endpoint data, through the usb_lookup_ep_data(9F), device drivers should call the usb_ep_xdescr_fill(9F) function. After that, the usb_ep_xdescr_t structure will be filled in.

The usb_ep_xdescr_t structure has the following members:
uint_t			uex_version;
usb_ep_xdescr_flags_t	uex_flags;
usb_ep_descr_t		uex_ep;
usb_ep_ss_comp_descr_t	uex_ep_ss;

The uex_version member is used to describe the current version of this structure. This member will be set to the value passed in by the device driver to usb_ep_xdescr_fill(9F). Device drivers should ignore this field and should not modify the value placed there or modify it.

The uex_flags member is an enumeration that defines a number of flags. Each flag indicates whether or not a given member is present or valid. Before accessing any member other than uex_ep, the device driver should check the flag here, otherwise its contents may be undefined. Currently the following flags are defined:

Indicates that a SuperSpeed endpoint companion descriptor is present and has been filled in. The member uex_ep_ss is valid.

The uex_ep member contains a traditional USB endpoint descriptor. Its contents are defined in usb_ep_descr(9S). There is no flag for this member in uex_flags, it is always valid.

The uex_ep_ss member contains a USB 3.0 SuperSpeed endpoint companion descriptor as defined in usb_ep_ss_comp_descr(9S). This member is only valid if the USB_EP_XFLAGS_SS_COMP flag is specified in uex_flags.

usb_ep_xdescr_fill(9F), usb_pipe_xopen(9F), usb_ep_descr(9S), usb_ep_ss_comp_descr(9S)
September 16, 2016 OmniOS