USBA_HCDI_REGISTER_ARGS(9S) Data Structures for Drivers

NAME


usba_hcdi_register_args, usba_hcdi_register_args_t - USB HCD driver
registration

SYNOPSIS


#include <sys/usb/usba/hcdi.h>

INTERFACE LEVEL


Volatile - illumos USB HCD private

This is a private data structure that is not part of the stable DDI.
It may be removed or changed at any time.

DESCRIPTION


The usba_hcdi_register_args_t structure is used by USB HCD device
drivers to register with the USBA framework.

The structure is used with the usba_hcdi_register(9F) function. Device
drivers may statically allocate this structure on the stack. It does
not need to be allocated on the heap or used beyond the call to
usba_hcdi_register(9F).

For more information on the HCD device driver initialization process,
see usba_hcdi(9E).

STRUCTURE MEMBERS


The usba_hcdi_register_args_t structure has the following members:

uint_t usba_hcdi_register_version;
dev_info_t *usba_hcdi_register_dip;
usba_hcdi_ops_t *usba_hcdi_register_ops;
ddi_dma_attr_t *usba_hcdi_register_dma_attr;
ddi_iblock_cookie_t usba_hcdi_register_iblock_cookie;

The usba_hcdi_register_version function should be set to the value of
the pre-processor macro HCDI_REGISTER_VERSION. This ensures that if
future revisions to this structure are made, existing drivers should
continue to function. Note, that this structure is Volatile. Support
for older versions or drastic changes may occur at any time and this
should not be relied on nor construed as a guarantee against such
changes.

The usba_hcdi_register_dip should be set to the dev_info_t of the
device driver instance that is registering with the USBA.

The usba_hcdi_register_ops member is a structure of entry points for
the USBA framework to call into the USB framework. It should be
allocated with a call to usba_alloc_hcdi_ops(9F) and released with a
call to usba_free_hcdi_ops(9F), after the driver has called
usba_hcdi_register(9F).

Please see usba_hcdi_ops(9S) for more information on the members of the
structure and for more information on how they should be filled in.

The usba_hcdi_register_dma_attr member should be a pointer to a set of
DMA attributes. These DMA attributes will be used by a subset of
client device drivers to perform allocations, in particular scsa2usb.
In general, try to make sure that these DMA attributes are valid for
more transforms, though these will generally be used for bulk
transfers.

The usba_hcdi_register_iblock_cookie members should be filed in with
the general interrupt priority of the device driver after it has
allocated interrupts. Device drivers may obtain the priority by
calling ddi_intr_get_pri(9F) and then casting the obtained interrupt
priority to the ddi_iblock_cookie_t.

SEE ALSO


usba_hcdi(9E), ddi_intr_get_pri(9F), usba_alloc_hcdi_ops(9F),
usba_free_hcdi_ops(9F), usba_hcdi_register(9F), usba_hcdi_ops(9S)

illumos November 26, 2017 illumos

tribblix@gmail.com :: GitHub :: Privacy