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 May 7, 2016
15.Dt USBA_HCDI_GET_DEVICE_PRIVATE 9F
16.Os
17.Sh NAME
18.Nm usba_hcdi_get_device_private
19.Nd get HCD per-device private value
20.Sh SYNOPSIS
21.In sys/usb/usba/hcdi.h
22.Ft void *
23.Fo usba_hcdi_get_device_private
24.Fa "usba_device_t *usb_device"
25.Fc
26.Sh INTERFACE LEVEL
27.Sy Volatile -
28illumos USB HCD private function
29.Pp
30This is a private function that is not part of the stable DDI.
31It may be removed or changed at any time.
32.Sh PARAMETERS
33.Bl -tag -width Fa
34.It Fa usb_device
35Pointer to a USB device.
36.El
37.Sh DESCRIPTION
38The
39.Fn usba_hcdi_get_device_private
40function obtains the private data set by a HCD driver.
41This private data is created by the HCD driver's optional entry point
42.Xr usba_hcdi_device_init 9E
43and is removed during the HCD driver's optional entry point
44.Xr usba_hcdi_device_fini 9E .
45If an HCD driver does not implement these entry points then the value
46obtained by a call will always be the null pointer,
47.Dv NULL .
48.Pp
49The framework provides no form of locking of this data and it is up to
50the HCD driver to use whatever synchronization primitives it requires if
51needed.
52.Sh CONTEXT
53The
54.Fn usba_hcdi_get_device_private
55function is generally called from the context of a
56.Xr usba_hcdi 9E
57entry point, but may be called from user, kernel, or interrupt context.
58.Sh RETURN VALUES
59The private data set by an HCD driver is always returned.
60If no such value has been set, then
61.Dv NULL
62is returned.
63.Sh SEE ALSO
64.Xr usba_hcdi 9E ,
65.Xr usba_hcdi_device_fini 9E ,
66.Xr usba_hcdi_device_init 9E
67