summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f/usb_ep_xdescr_fill.9f
blob: 94947c78603bad6d6e67f68176ce4539f82e4813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source.  A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright 2016 Joyent, Inc.
.\"
.Dd Aug 7, 2016
.Dt USB_EP_XDESCR_FILL 9F
.Os
.Sh NAME
.Nm usb_ep_xdescr_fill
.Nd fill extended endpoint description from endpoint data
.Sh SYNOPSIS
.In sys/usb/usba.h
.Ft int
.Fo usb_ep_xdescr_fill
.Fa "uint_t version"
.Fa "dev_info_t *dip"
.Fa "usb_ep_data_t *ep_data"
.Fa "usb_ep_xdescr_t *ep_xdescr"
.Fc
.Sh INTERFACE STABILITY
illumos DDI specific
.Sh PARAMETESR
.Bl -tag -width Fa
.It Fa version
Indicates the current version of the
.Ft usb_ep_xdescr_t
structure the driver is using.
Callers should always specify
.Sy USB_EP_XDESCR_CURRENT_VERSION .
.It Fa dip
Pointer to the device's
.Sy dev_info
structure.
.It Fa ep_data
Pointer to endpoint data retrieved by calling
.Xr usb_lookup_ep_data 9F .
.It Fa ep_xdescr
Pointer to the extended endpoint descriptor that will be filled out.
.El
.Sh DESCRIPTION
The
.Fn usb_ep_xdescr_fill
function is used to fill in the members of the extended endpoint
descriptor
.Fa ep_xdescr
based on the endpoint descriptor data in
.Fa ep_data .
Once filled in,
.Fa ep_xdescr
can be used to open a pipe by calling
.Xr usb_pipe_xopen 9F .
.Pp
Prior to USB 3.0, only one descriptor, the
.Xr 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
.Fa ep_xdescr
and the endpoint data,
.Fa ep_data ,
is no longer required.
.Sh CONTEXT
The
.Fn usb_ep_xdescr_fill
is generally only called from a drivers
.Xr attach 9E
entry point; however, it may be called from either
.Sy user
or
.Sy kernel
context.
.Sh RETURN VALUES
Upon successful completion, the
.Fn usb_ep_xdescr_fill
function returns
.Sy USB_SUCCESS .
Otherwise an error number is returned.
.Sh ERRORS
.Bl -tag -width Er
.It Er USB_INVALID_ARGS
The value of
.Fa version
is unknown, or one of
.Fa dip ,
.Fa ep_data ,
and
.Fa ep_xdescr
was an invalid pointer.
.It Er USB_FAILURE
An unknown error occurred.
.El
.Sh SEE ALSO
.Xr usb_lookup_ep_data 9F ,
.Xr usb_pipe_xopen 9F ,
.Xr usb_ep_descr 9S ,
.Xr usb_ep_ss_comp_descr 9S ,
.Xr usb_ep_xdescr 9S