USB_EP_XDESCR_FILL(9F) Kernel Functions for Drivers USB_EP_XDESCR_FILL(9F)

usb_ep_xdescr_fillfill extended endpoint description from endpoint data

#include <sys/usb/usba.h>

usb_ep_xdescr_fill(uint_t version, dev_info_t *dip, usb_ep_data_t *ep_data, usb_ep_xdescr_t *ep_xdescr);

illumos DDI specific

Indicates the current version of the usb_ep_xdescr_t structure the driver is using. Callers should always specify .
Pointer to the device's structure.
Pointer to endpoint data retrieved by calling usb_lookup_ep_data(9F).
Pointer to the extended endpoint descriptor that will be filled out.

The () function is used to fill in the members of the extended endpoint descriptor ep_xdescr based on the endpoint descriptor data in ep_data. Once filled in, ep_xdescr can be used to open a pipe by calling usb_pipe_xopen(9F).

Prior to USB 3.0, only one descriptor, the usb_ep_descr(9S), was needed to describe an endpoint. However, with USB 3.0, additional companion descriptors have been added and are required to successfully open an endpoint. After calling this, all descriptors needed to successfully open a pipe will be placed into ep_xdescr and the endpoint data, ep_data, is no longer required.

The usb_ep_xdescr_fill() is generally only called from a drivers attach(9E) entry point; however, it may be called from either or context.

Upon successful completion, the usb_ep_xdescr_fill() function returns . Otherwise an error number is returned.

The value of version is unknown, or one of dip, ep_data, and ep_xdescr was an invalid pointer.
An unknown error occurred.

usb_lookup_ep_data(9F), usb_pipe_xopen(9F), usb_ep_descr(9S), usb_ep_ss_comp_descr(9S), usb_ep_xdescr(9S)

August 7, 2016 OmniOS