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
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.
12 .\" Copyright 2016 Joyent, Inc.
20 .Nd USBA Device Data Structure
22 .In sys/usb/usba/hcdi.h
25 illumos USB HCD private
27 This is a private data structure that is not part of the stable DDI.
28 It may be removed or changed at any time.
32 structure is used by the illumos USB Architecture (USBA) to represent a
34 While a given USB device may be a composite device, a USB device that implements
35 two or more classes, there will still only be a single device structure.
36 A USB device is always plugged into a port on some hub, excepting the root hub,
37 and has an address on the USB fabric.
39 Many of the USB HCD driver operations pass a
44 should be used by an HCD driver in a
47 A subset of the structure's fields that are useful for HCD drivers to read are
50 In addition, there are two optional HCD entry points that interact with
51 this structure and give the change for a driver to store per-device
53 If the driver implements the
54 .Xr usba_hcdi_device_init 9E
56 .Xr usba_hcdi_device_fini 9E
57 functions, then the private data stored from
58 .Xr usba_hcdi_device_init 9E
60 .Xr usba_hcdi_get_device_private 9F .
64 structure includes the following members:
65 .Bd -literal -offset indent
67 usba_hubdi_t *usb_hubdi;
69 usb_dev_descr_t *usb_dev_descr;
71 char *usb_product_str;
72 char *usb_serialno_str;
73 usb_port_status_t usb_port_status;
75 usba_device_t *usb_hs_hub_usba_dev;
76 usba_device_t *usb_parent_hub;
81 member is a pointer to the device's
84 This generally is used if the HCD driver wants to get naming information for
86 When duplicating requests for isochronous and interrupt requests, HCD drivers
90 .Xr usba_pipe_handle_data_t 9S .
94 member can be used to determine whether or not the
96 in question is a hub or not.
97 HCD drivers should compare this member to
101 then this USB device corresponds to a hub.
105 member indicates the address of the USB device on the broader USB bus.
106 Note, that the actual address assigned to the device may be different,
107 especially if the HCD driver implements the optional
108 .Xr usba_hcdi_device_address 9E
114 for more information.
118 member points to the device descriptor for a given device.
119 This structure is documented in
120 .Xr usb_dev_descr 9S .
123 as it may not have been populated during device
127 HCD drivers should always check for
129 before dereferencing it.
133 member may contain a pointer to a character string with the name of the
134 manufacturer as retrieved from the device.
137 HCD drivers should always check for
139 before dereferencing it.
143 member may contain a pointer to a character string with the name of the
144 product as retrieved from the device.
147 HCD drivers should always check for
149 before dereferencing it.
153 member may contain a pointer to a character string with the serial
154 number of the device as retrieved from the device.
157 HCD drivers should always check for
159 before dereferencing it.
164 .Xr usb_port_status_t 9T
165 entry, which describes the current negotiated speed of the device.
167 .Xr usb_port_status_t 9T
168 for more information on the values and types.
172 member contains the port on a hub that the device is plugged into.
173 Ports are always numbered starting at 1.
176 .Sy usb_hs_hub_usba_dev
177 member is set when there is a parent high-speed hub.
178 This is most notable for low- and full- speed devices which require split
182 structure that is the closest high-speed parent hub.
186 for super-speed devices.
187 A device operating a super-speed can never be plugged into a high-speed hub.
193 structure that the device in question is plugged into.
194 If the device represents the root hub, then this field will be
198 .Xr usba_hcdi_device_address 9E ,
199 .Xr usba_hcdi_device_fini 9E ,
200 .Xr usba_hcdi_device_init 9E ,
201 .Xr usba_pipe_handle_data_t 9S ,
202 .Xr usb_port_status_t 9T