summaryrefslogtreecommitdiff
path: root/usr/src/man/man9s/usb_ep_ss_comp_descr.9s
blob: ba3f4e06b00c3ad065a052b5848b1c5e033dd903 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.\"
.\" 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 10, 2016
.Dt USB_EP_SS_COMP_DESCR 9S
.Os
.Sh NAME
.Nm usb_ep_ss_comp_descr ,
.Nm usb_ep_ss_comp_descr_t
.Nd USB endpoint SuperSpeed Companion Descriptor
.Sh SYNOPSIS
.In sys/usb/usba.h
.Sh INTERFACE LEVEL
illumos DDI Specific
.Sh DESCRIPTION
The
.Sy usb_ep_ss_comp_descr_t
structure defines additional endpoint attributes for USB 3.0 and newer
devices.
This structure is considered a
.Em companion descriptor .
On its own, it does not uniquely define an endpoint.
A standard USB descriptor is still required.
See
.Xr usb_ep_descr 9S
for the definition of the standard descriptor.
.Pp
If available, the SuperSpeed companion descriptor can be accessed by
getting the endpoint data through a call to
.Xr usb_lookup_ep_data 9F .
These descriptors are required to open pipes for USB 3.0 and newer
devices.
They can be assembled into the proper format for
.Xr usb_pipe_xopen 9F
by calling
.Xr usb_ep_xdescr_fill 9F .
.Pp
This structure is formally defined in section 9.6.7 of the USB 3.1
specification.
.Sh STRUCTURE MEMBERS
.Bd -literal -offset indent
uint8_t		bLength;
uint8_t		bDescriptorType;
uint8_t		bMaxBurst;
uint8_t		bmAttributes;
uint16_t	wBytesPerInterval;
.Ed
.Pp
The
.Sy bLength
member is always set to the size of this descriptor, which is usually
six.
.Pp
The
.Sy bDescriptorType
member should be set to the macro
.Sy USB_DESCR_TYPE_SS_EP_COMP
whose value is 0x30.
.Pp
The
.Sy bMaxBurst
member indicates the maximum number of packets that the endpoint can
send in one 'burst'.
Valid values range from 0 to 15 and the values are one less than the number of
packets.
A value of 0 indicates that 1 packet can be sent in a burst.
A value of 15 indicates that 16 packets can be sent in a burst.
.Pp
The
.Sy bmAttributes
member indicates different attributes of the endpoint.
This member is reserved and should be zero for
.Sy control
and
.Sy interrupt
endpoints.
.Pp
For a
.Sy bulk
endpoint, the
.Sy bmAttributes
member is used to indicate the maximum number of streams that the device
supports.
The first five bits (4:0) are used, the remaining 3 bits are reserved and should
be zero.
Values range from 0 to 16.
A value of zero indicates that streams are not supported.
Otherwise, it indicates that the device supports 2 raised to the value number of
streams.
A value of 3, indicates 2^3 streams are supported.
.Pp
For an
.Sy isochronous
endpoint, the
.Sy bmAttributes
member is used to indicate the value of the
.Sy Mult
property, a value used to calculate the maximum number of packets the
device and receive in a service interval.
The first two bits (1:0) are used to determine the mult.
The remaining 6 bits (7:2) are reserved and should be set to zero.
.Pp
The
.Sy wBytesPerInterval
member is used to indicate the total number of bytes that can be
transferred in one service interval.
Note, this is only valid for
.Sy Isochronous
and
.Sy Interrupt IN
(periodic) endpoints.
.Sh SEE ALSO
.Xr usb_ep_xdescr_fill 9F ,
.Xr usb_pipe_xopen 9F ,
.Xr usb_ep_descr 9S ,
.Xr usb_ep_xdescr 9S
.Rs
.%T Universal Serial Bus 3.1 Specification
.%U www.usb.org
.Re