xref: /illumos-gate/usr/src/man/man9s/usb_ep_ss_comp_descr.9s (revision c160bf3613805cfb4a89a0433ae896d3594f551f)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2016 Joyent, Inc.
13.\"
14.Dd Aug 10, 2016
15.Dt USB_EP_SS_COMP_DESCR 9S
16.Os
17.Sh NAME
18.Nm usb_ep_ss_comp_descr ,
19.Nm usb_ep_ss_comp_descr_t
20.Nd USB endpoint SuperSpeed Companion Descriptor
21.Sh SYNOPSIS
22.In sys/usb/usba.h
23.Sh INTERFACE LEVEL
24illumos DDI Specific
25.Sh DESCRIPTION
26The
27.Sy usb_ep_ss_comp_descr_t
28structure defines additional endpoint attributes for USB 3.0 and newer
29devices. This structure is considered a
30.Em companion descriptor .
31On its own, it does not uniquely define an endpoint. A standard USB
32descriptor is still required. See
33.Xr usb_ep_descr 9S
34for the definition of the standard descriptor.
35.Pp
36If available, the SuperSpeed companion descriptor can be accessed by
37getting the endpoint data through a call to
38.Xr usb_lookup_ep_data 9F .
39These descriptors are required to open pipes for USB 3.0 and newer
40devices. They can be assembled into the proper format for
41.Xr usb_pipe_xopen 9F
42by calling
43.Xr usb_ep_xdescr_fill 9F .
44.Pp
45This structure is formally defined in section 9.6.7 of the USB 3.1
46specification.
47.Sh STRUCTURE MEMBERS
48.Bd -literal -offset indent
49uint8_t		bLength;
50uint8_t		bDescriptorType;
51uint8_t		bMaxBurst;
52uint8_t		bmAttributes;
53uint16_t	wBytesPerInterval;
54.Ed
55.Pp
56The
57.Sy bLength
58member is always set to the size of this descriptor, which is usually
59six.
60.Pp
61The
62.Sy bDescriptorType
63member should be set to the macro
64.Sy USB_DESCR_TYPE_SS_EP_COMP
65whose value is 0x30.
66.Pp
67The
68.Sy bMaxBurst
69member indicates the maximum number of packets that the endpoint can
70send in one 'burst'. Valid values range from 0 to 15 and the values are
71one less than the number of packets. A value of 0 indicates that 1
72packet can be sent in a burst. A value of 15 indicates that 16 packets
73can be sent in a burst.
74.Pp
75The
76.Sy bmAttributes
77member indicates different attributes of the endpoint. This member is
78reserved and should be zero for
79.Sy control
80and
81.Sy interrupt
82endpoints.
83.Pp
84For a
85.Sy bulk
86endpoint, the
87.Sy bmAttributes
88member is used to indicate the maximum number of streams that the device
89supports. The first five bits (4:0) are used, the remaining 3 bits are
90reserved and should be zero. Values range from 0 to 16.  A value of zero
91indicates that streams are not supported. Otherwise, it indicates that
92the device supports 2 raised to the value number of streams. A value of
933, indicates 2^3 streams are supported.
94.Pp
95For an
96.Sy isochronous
97endpoint, the
98.Sy bmAttributes
99member is used to indicate the value of the
100.Sy Mult
101property, a value used to calculate the maximum number of packets the
102device and receive in a service interval. The first two bits (1:0) are
103used to determine the mult. The remaining 6 bits (7:2) are reserved and
104should be set to zero.
105.Pp
106The
107.Sy wBytesPerInterval
108member is used to indicate the total number of bytes that can be
109transferred in one service interval. Note, this is only valid for
110.Sy Isochronous
111and
112.Sy Interrupt IN
113(periodic) endpoints.
114.Sh SEE ALSO
115.Xr usb_ep_xdescr_fill 9F ,
116.Xr usb_pipe_xopen 9F ,
117.Xr usb_ep_descr 9S ,
118.Xr usb_ep_xdescr 9S
119.Rs
120.%T Universal Serial Bus 3.1 Specification
121.%U www.usb.org
122.Re
123