xref: /illumos-gate/usr/src/man/man9f/usba_hcdi_get_device_private.9f (revision 72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2)
19b0e7716SRobert Mustacchi.\"
29b0e7716SRobert Mustacchi.\" This file and its contents are supplied under the terms of the
39b0e7716SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0.
49b0e7716SRobert Mustacchi.\" You may only use this file in accordance with the terms of version
59b0e7716SRobert Mustacchi.\" 1.0 of the CDDL.
69b0e7716SRobert Mustacchi.\"
79b0e7716SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this
89b0e7716SRobert Mustacchi.\" source.  A copy of the CDDL is also available via the Internet at
99b0e7716SRobert Mustacchi.\" http://www.illumos.org/license/CDDL.
109b0e7716SRobert Mustacchi.\"
119b0e7716SRobert Mustacchi.\"
129b0e7716SRobert Mustacchi.\" Copyright 2016 Joyent, Inc.
139b0e7716SRobert Mustacchi.\"
149b0e7716SRobert Mustacchi.Dd May 7, 2016
159b0e7716SRobert Mustacchi.Dt USBA_HCDI_GET_DEVICE_PRIVATE 9F
169b0e7716SRobert Mustacchi.Os
179b0e7716SRobert Mustacchi.Sh NAME
189b0e7716SRobert Mustacchi.Nm usba_hcdi_get_device_private
199b0e7716SRobert Mustacchi.Nd get HCD per-device private value
209b0e7716SRobert Mustacchi.Sh SYNOPSIS
219b0e7716SRobert Mustacchi.In sys/usb/usba/hcdi.h
229b0e7716SRobert Mustacchi.Ft void *
239b0e7716SRobert Mustacchi.Fo usba_hcdi_get_device_private
249b0e7716SRobert Mustacchi.Fa "usba_device_t *usb_device"
259b0e7716SRobert Mustacchi.Fc
269b0e7716SRobert Mustacchi.Sh INTERFACE LEVEL
279b0e7716SRobert Mustacchi.Sy Volatile -
289b0e7716SRobert Mustacchiillumos USB HCD private function
299b0e7716SRobert Mustacchi.Pp
30*72d3dbb9SYuri PankovThis is a private function that is not part of the stable DDI.
31*72d3dbb9SYuri PankovIt may be removed or changed at any time.
329b0e7716SRobert Mustacchi.Sh PARAMETERS
339b0e7716SRobert Mustacchi.Bl -tag -width Fa
349b0e7716SRobert Mustacchi.It Fa usb_device
359b0e7716SRobert MustacchiPointer to a USB device.
369b0e7716SRobert Mustacchi.El
379b0e7716SRobert Mustacchi.Sh DESCRIPTION
389b0e7716SRobert MustacchiThe
399b0e7716SRobert Mustacchi.Fn usba_hcdi_get_device_private
40*72d3dbb9SYuri Pankovfunction obtains the private data set by a HCD driver.
41*72d3dbb9SYuri PankovThis private data is created by the HCD driver's optional entry point
429b0e7716SRobert Mustacchi.Xr usba_hcdi_device_init 9E
439b0e7716SRobert Mustacchiand is removed during the HCD driver's optional entry point
449b0e7716SRobert Mustacchi.Xr usba_hcdi_device_fini 9E .
459b0e7716SRobert MustacchiIf an HCD driver does not implement these entry points then the value
469b0e7716SRobert Mustacchiobtained by a call will always be the null pointer,
479b0e7716SRobert Mustacchi.Dv NULL .
489b0e7716SRobert Mustacchi.Pp
499b0e7716SRobert MustacchiThe framework provides no form of locking of this data and it is up to
509b0e7716SRobert Mustacchithe HCD driver to use whatever synchronization primitives it requires if
519b0e7716SRobert Mustacchineeded.
529b0e7716SRobert Mustacchi.Sh CONTEXT
539b0e7716SRobert MustacchiThe
549b0e7716SRobert Mustacchi.Fn usba_hcdi_get_device_private
559b0e7716SRobert Mustacchifunction is generally called from the context of a
569b0e7716SRobert Mustacchi.Xr usba_hcdi 9E
579b0e7716SRobert Mustacchientry point, but may be called from user, kernel, or interrupt context.
589b0e7716SRobert Mustacchi.Sh RETURN VALUES
59*72d3dbb9SYuri PankovThe private data set by an HCD driver is always returned.
60*72d3dbb9SYuri PankovIf no such value has been set, then
619b0e7716SRobert Mustacchi.Dv NULL
629b0e7716SRobert Mustacchiis returned.
639b0e7716SRobert Mustacchi.Sh SEE ALSO
649b0e7716SRobert Mustacchi.Xr usba_hcdi 9E ,
659b0e7716SRobert Mustacchi.Xr usba_hcdi_device_fini 9E ,
669b0e7716SRobert Mustacchi.Xr usba_hcdi_device_init 9E
67