USB_EP_XDESCR_FILL(9F) Kernel Functions for Drivers USB_EP_XDESCR_FILL(9F)
NAME
usb_ep_xdescr_fill - fill extended endpoint description from endpoint
data
SYNOPSIS
#include <sys/usb/usba.h> int usb_ep_xdescr_fill(
uint_t version,
dev_info_t *dip,
usb_ep_data_t *ep_data,
usb_ep_xdescr_t *ep_xdescr);
INTERFACE STABILITY
illumos DDI specific
PARAMETESR
version Indicates the current version of the
usb_ep_xdescr_t structure the driver is using. Callers should always
specify
USB_EP_XDESCR_CURRENT_VERSION.
dip Pointer to the device's
dev_info structure.
ep_data Pointer to endpoint data retrieved by calling
usb_lookup_ep_data(9F).
ep_xdescr Pointer to the extended endpoint descriptor that will be
filled out.
DESCRIPTION
The
usb_ep_xdescr_fill() 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.
CONTEXT
The
usb_ep_xdescr_fill() is generally only called from a drivers
attach(9E) entry point; however, it may be called from either
user or
kernel context.
RETURN VALUES
Upon successful completion, the
usb_ep_xdescr_fill() function returns
USB_SUCCESS. Otherwise an error number is returned.
ERRORS
USB_INVALID_ARGS The value of
version is unknown, or one of
dip,
ep_data, and
ep_xdescr was an invalid pointer.
USB_FAILURE An unknown error occurred.
SEE ALSO
usb_lookup_ep_data(9F),
usb_pipe_xopen(9F),
usb_ep_descr(9S),
usb_ep_ss_comp_descr(9S),
usb_ep_xdescr(9S)illumos August 7, 2016 illumos