Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / usba_alloc_hcdi_ops.9f
blobba5a202dbe64b742220218b3e1e71ce9afb4d6b0
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_ALLOC_HCDI_OPS 9F
16 .Os
17 .Sh NAME
18 .Nm usba_alloc_hcdi_ops ,
19 .Nm usba_free_hcdi_ops
20 .Nd allocate and free USB HCD interface operations structure
21 .Sh SYNOPSIS
22 .In sys/usb/usba/hcdi.h
23 .Ft "usba_hcdi_ops_t *"
24 .Fo usba_alloc_hcdi_ops
25 .Fa void
26 .Fc
27 .Ft void
28 .Fo usba_free_hcdi_ops
29 .Fa "usba_hcdi_ops_t *ops"
30 .Fc
31 .Sh INTERFACE LEVEL
32 .Sy Volatile -
33 illumos USB HCD private function
34 .Pp
35 This is a private function that is not part of the stable DDI.
36 It may be removed or changed at any time.
37 .Sh PARAMATERS
38 .Bl -tag -width Fa
39 .It Fa ops
40 Pointer to an allocated HCD interface operations structure.
41 .El
42 .Sh DESCRIPTION
43 The
44 .Fn usba_alloc_hcdi_ops
45 function allocates a
46 .Xr usba_hcdi_ops_t 9S
47 structure for use for a USB HCD driver.
48 As part of initialization, a USB HCD driver will allocate this and fill it in.
49 For more information on the full lifetime of the object and when a USB HCD
50 driver should release the structure, see
51 .Xr usba_hcdi 9E .
52 .Pp
53 The
54 .Fn usba_free_hcdi_ops
55 function release the memory associated with the
56 .Xr usba_hcdi_ops_t 9S
57 structure pointed to by
58 .Fa ops .
59 Only pointers received from a call to the
60 .Fn usba_alloc_hcdi_ops
61 function should be passed to this function.
62 .Sh CONTEXT
63 These functions are generally called from kernel context during a USB
64 HCD driver's
65 .Xr attach 9E
66 and
67 .Xr detach 9E
68 entry points.
69 While it is safe to call this function from user context, it would be quite
70 unusal to do so.
71 .Sh RETURN VALUES
72 The
73 .Fn usba_alloc_hcdi_ops
74 function always succeeds and returns a pointer to an allocation
75 operations structure.
76 .Sh SEE ALSO
77 .Xr usba_hcdi 9E ,
78 .Xr usba_hcdi_ops_t 9S