xref: /illumos-gate/usr/src/man/man9e/usba_hcdi_hub_update.9e (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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 February 15, 2020
15.Dt USBA_HCDI_HUB_UPDATE 9E
16.Os
17.Sh NAME
18.Nm usba_hcdi_hub_update
19.Nd USB HCD hub update entry point
20.Sh SYNOPSIS
21.In sys/usb/usba/hcdi.h
22.Ft int
23.Fo prefix_hcdi_hub_update
24.Fa "usba_device_t *ud"
25.Fa "uint8_t nports"
26.Fa "uint8_t tt"
27.Fc
28.Sh INTERFACE LEVEL
29.Sy Volatile -
30illumos USB HCD private function
31.Pp
32This is a private function that is not part of the stable DDI.
33It may be removed or changed at any time.
34.Sh PARAMETERS
35.Bl -tag -width Fa
36.It Fa ud
37Pointer to a USB device structure being updated.
38See
39.Xr usba_device 9S
40for more information.
41.It Fa nports
42The number of ports present on the hub.
43.It Fa tt
44The value of the Think Time property as defined in the USB
45specification's hub descriptor.
46.El
47.Sh DESCRIPTION
48The
49.Fn usba_hcdi_hub_update
50entry point is an optional entry point for USB host controller drivers.
51It is used by some controllers to allow them to update information about
52a device in the controller after a device has been determined to be a
53hub during enumeration.
54If a host controller does not need to take any specific action after enumerating
55a hub, then it should simply set this entry point in the
56.Xr usba_hcdi_ops 9S
57structure to
58.Dv NULL .
59.Pp
60The
61.Fa nports
62and
63.Fa tt
64members provide relevant information from the device's hub class
65descriptor which can be used to help program the host controller.
66Any programming should be performed synchronously and be completed before
67this function returns.
68.Pp
69This function will be called after
70.Xr usba_hcdi_device_init 9E
71has been called.
72Any private data registered with that function will be available.
73.Pp
74If this function fails, the enumeration of this device will fail, the
75hub driver will not attach to this USB device, and all devices plugged
76into this hub will not be detected by the system.
77.Sh CONTEXT
78This function is called from kernel context only.
79.Sh RETURN VALUES
80Upon successful completion, the
81.Fn usba_hcdi_hub_update
82function should return
83.Sy USB_SUCCESS .
84Otherwise, it should return the appropriate USB error.
85If uncertain, use
86.Sy USB_FAILURE .
87.Sh SEE ALSO
88.Xr usba_hcdi_device_init 9E ,
89.Xr usba_device 9S ,
90.Xr usba_hcdi_ops 9S
91