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 Nov 26, 2017 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 - 33illumos USB HCD private function 34.Pp 35This is a private function that is not part of the stable DDI. 36It may be removed or changed at any time. 37.Sh PARAMETERS 38.Bl -tag -width Fa 39.It Fa ops 40Pointer to an allocated HCD interface operations structure. 41.El 42.Sh DESCRIPTION 43The 44.Fn usba_alloc_hcdi_ops 45function allocates a 46.Xr usba_hcdi_ops_t 9S 47structure for use for a USB HCD driver. 48As part of initialization, a USB HCD driver will allocate this and fill it in. 49For more information on the full lifetime of the object and when a USB HCD 50driver should release the structure, see 51.Xr usba_hcdi 9E . 52.Pp 53The 54.Fn usba_free_hcdi_ops 55function release the memory associated with the 56.Xr usba_hcdi_ops_t 9S 57structure pointed to by 58.Fa ops . 59Only pointers received from a call to the 60.Fn usba_alloc_hcdi_ops 61function should be passed to this function. 62.Sh CONTEXT 63These functions are generally called from kernel context during a USB 64HCD driver's 65.Xr attach 9E 66and 67.Xr detach 9E 68entry points. 69While it is safe to call this function from user context, it would be quite 70unusal to do so. 71.Sh RETURN VALUES 72The 73.Fn usba_alloc_hcdi_ops 74function always succeeds and returns a pointer to an allocation 75operations structure. 76.Sh SEE ALSO 77.Xr usba_hcdi 9E , 78.Xr usba_hcdi_ops_t 9S 79