USBA_HCDI_HUB_UPDATE(9E) | Driver Entry Points | USBA_HCDI_HUB_UPDATE(9E) |
usba_hcdi_device_address
—
Assign USB address to device
#include
<sys/usb/usba/hcdi.h>
int
prefix_hcdi_device_address
(usba_device_t
*ud);
Volatile - illumos USB HCD private function
This is a private function that is not part of the stable DDI. It may be removed or changed at any time.
The
usba_hcdi_device_address
()
entry point is an optional entry point for USB host controller drivers. Some
USB host controllers do not allow the USB SET_ADDRESS command to be issued
to a device. Instead, they will be responsible for setting the address in a
controller-specific way. If the host controller driver requires this
behavior, then it must implement this function. Otherwise, if the host
controller does not require this functionality, it should set the entry
point in the usba_hcdi_ops(9S)
structure to NULL
.
The USBA will always set an address for the USBA device ud regardless of whether or not this function is implemented. If the HCD implements this entry point and it needs the addressing information for whatever reason, then it is the responsibility of the driver to keep track of it separately.
This entry point will be called after the usba_hcdi_device_init(9E) entry point has been called. Any private data stored on the device will be available through the usba_hcdi_get_device_private(9F) function.
Upon completion of the function, the device is expected to be addressed and thus able to have endpoints opened and transfers performed on them. If this function fails, the device's enumeration will halt.
This function is called from kernel context ontly.
Upon successful completion, the
usba_hcdi_device_address
() function should return
USB_SUCCESS.
Otherwise, it should return the appropriate USB error. If uncertain, use
USB_FAILURE.
usba_hcdi_device_init(9E), usba_hcdi_get_device_private(9F), usba_device(9S), usba_hcdi_ops(9S)
December 20, 2016 | OmniOS |