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.
15 .Dt USBA_HCDI_BIND_ROOT_HUB 9F
18 .Nm usba_hubdi_bind_root_hub ,
19 .Nm usba_hubdi_unbind_root_hub
20 .Nd bind and unbind the root USB hub
22 .In sys/usb/usba/hubdi.h
24 .Fo usba_hubdi_bind_root_hub
26 .Fa "uchar_t *hub_descr"
27 .Fa "size_t descr_len"
28 .Fa "usb_dev_descr_t *dev_descr"
31 .Fo usba_hubdi_unbind_root_hub
36 illumos USB HCD private function
38 This is a private function that is not part of the stable DDI.
39 It may be removed or changed at any time.
43 Pointer to the device's
47 Pointer to a byte array that contains the standard descriptors for a USB
50 The length in bytes of the
54 A filled in standard USB device descriptor.
58 .Fn usba_hubdi_bind_root_hub
60 .Fn usba_hubdi_unbind_root_hub
61 functions are used to bind and unbind the root USB hub that is a part of
65 for more information on this relationship.
68 .Fn usba_hubdi_root_bind_driver
69 is used after calling the
70 .Xr usba_hcdi_register 9F
71 function during a device's
75 Because the root hub is generally a virtual hub, the HCD driver is
76 responsible for making it appear to the system as a normal USB hub.
80 should be the standard USB Hub class-specific descriptor.
81 This hub descriptor should match a hub of a similar class of speed.
82 For example, with the xhci controller, a USB 3.x Hub class-specific descriptor
83 is used, where as for the ehci controller, a USB 2.x Hub class-specific
85 For more information, see the USB 3.1 specification, section 10.15.2
86 .Em Class-specific Descriptors .
88 Similarly, the contents of the
90 need to be a filled in USB device descriptor that indicates that the
91 root hub corresponds to the appropriate USB generation.
92 For more information on the contents, see
94 and the USB 3.1 specification, section 10.15.1
95 .Em Standard Descriptors for Hub Class .
98 .Fn usba_hubdi_unbind_root_hub
99 function is used to detach the root hub associated with the HCD driver.
100 This should be called during a device's
102 routine before calling
103 .Xr usba_hcdi_unregister 9F .
106 .Fn usba_hubdi_unbind_root_hub
107 function fails during a device's
109 function, then it should fail the call to
113 .Fn usba_hubdi_bind_root_hub
114 function should only be called during a device's
119 .Fn usba_hubdi_unbind_root_hub
120 function should only be called during a device's
121 .Xr detach 9E entry point.
123 Upon successful completion, the
124 .Fn usba_hubdi_bind_root_hub
126 .Fn usba_hubdi_unbind_root_hub
129 Otherwise, they return
131 to indicate that they could not proceed.
136 .Xr usba_hcdi_register 9F ,
137 .Xr usba_hcdi_unregister 9F ,