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 Sep 20, 2016 15.Dt USBA_HCDI_REGISTER_ARGS 9S 16.Os 17.Sh NAME 18.Nm usba_hcdi_register_args , 19.Nm usba_hcdi_register_args_t 20.Nd USB HCD driver registeration 21.Sh SYNOPSIS 22.In sys/usb/usba/hcdi.h 23.Sh INTERFACE LEVEL 24.Sy Volatile - 25illumos USB HCD private 26.Pp 27This is a private data structure that is not part of the stable DDI. It 28may be removed or changed at any time. 29.Sh DESCRIPTION 30The 31.Sy usba_hcdi_register_args_t 32structure is used by USB HCD device drivers to register with the USBA 33framework. 34.Pp 35The structure is used with the 36.Xr usba_hcdi_register 9F 37function. Device drivers may statically allocate this structure on the 38stack. It does not need to be allocated on the heap or used beyond the 39call to 40.Xr usba_hcdi_register 9F . 41.Pp 42For more information on the HCD device driver initialization process, 43see 44.Xr usba_hcdi 9E . 45.Sh STRUCTURE MEMBERS 46The 47.Sy usba_hcdi_register_args_t 48structure has the following members: 49.Bd -literal -offset indent 50uint_t usba_hcdi_register_version; 51dev_info_t *usba_hcdi_register_dip; 52usba_hcdi_ops_t *usba_hcdi_register_ops; 53ddi_dma_attr_t *usba_hcdi_register_dma_attr; 54ddi_iblock_cookie_t usba_hcdi_register_iblock_cookie; 55.Ed 56.Pp 57The 58.Sy usba_hcdi_register_version 59function should be set to the value of the pre-processor macro 60.Sy HCDI_REGISTER_VERSION . 61This ensures that if future revisions to this structure are made, 62existing drivers should continue to function. Note, that this structure 63is 64.Sy Volatile . 65Support for older versions or drastic changes may occur at any time and 66this should not be relied on nor construed as a guarantee against such 67changes. 68.Pp 69The 70.Sy usba_hcdi_register_dip 71should be set to the 72.Sy dev_info_t 73of the device driver instance that is registering with the USBA. 74.Pp 75The 76.Sy usba_hcdi_register_ops 77member is a structure of entry points for the USBA framework to call 78into the USB framework. It should be allocated with a call to 79.Xr usba_alloc_hcdi_ops 9F 80and released with a call to 81.Xr usba_free_hcdi_ops 9F , 82after the drive has called 83.Xr usba_hcdi_register 9F . 84.Pp 85Please see 86.Xr usba_hcdi_ops 9S 87for more information on the members of the structure and for more 88information on how they should be filled in. 89.Pp 90The 91.Sy usba_hcdi_register_dma_attr 92member should be a pointer to a set of DMA attributes. These DMA 93attributes will be used by a subset of client device drivers to perform 94allocations, in particular scsa2usb. In general, try to make sure that 95these DMA attributes are valid for more transforms, though these will 96generally be used for bulk transfers. 97.Pp 98The 99.Sy usba_hcdi_register_iblock_cookie 100members should be filed in with the general interrupt priority of the 101device driver after it has allocated interrupts. Device drivers may 102obtain the priority by calling 103.Xr ddi_intr_get_pri 9F 104and then casting the obtained interrupt priority to the 105.Sy ddi_iblock_cookie_t . 106.Sh SEE ALSO 107.Xr usba_hcdi 9E , 108.Xr ddi_intr_get_pri 9F , 109.Xr usba_alloc_hcdi_ops 9F , 110.Xr usba_free_hcdi_ops 9F , 111.Xr usba_hcdi_register 9F , 112.Xr usba_hcdi_ops 9S 113