USB_GET_ADDR(9F) Kernel Functions for Drivers USB_GET_ADDR(9F)
usb_get_addr - Retrieve device USB address
#include <sys/usb/usba.h>
int usb_get_addr(dev_info_t *dip);
illumos DDI specific (illumos DDI)
dip
Pointer to the device's dev_info structure.
The usb_get_addr() function returns the current USB bus address for
debugging purposes. The returned address is unique for a specific
USB bus, and may be replicated if multiple host controller instances
are present on the system.
On success: USB device address.
On failure: returns 0. Fails if dip is NULL.
May be called from user, kernel or interrupt context.
int usb_addr;
usb_addr = usb_get_addr(dip);
See attributes(7) for descriptions of the following attributes:
+--------------------+-------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-------------------+
|Architecture | PCI-based systems |
+--------------------+-------------------+
|Interface stability | Committed |
+--------------------+-------------------+
attributes(7), usb_pipe_xopen(9F)
September 16, 2016 USB_GET_ADDR(9F)
NAME
usb_get_addr - Retrieve device USB address
SYNOPSIS
#include <sys/usb/usba.h>
int usb_get_addr(dev_info_t *dip);
INTERFACE LEVEL
illumos DDI specific (illumos DDI)
PARAMETERS
dip
Pointer to the device's dev_info structure.
DESCRIPTION
The usb_get_addr() function returns the current USB bus address for
debugging purposes. The returned address is unique for a specific
USB bus, and may be replicated if multiple host controller instances
are present on the system.
RETURN VALUES
On success: USB device address.
On failure: returns 0. Fails if dip is NULL.
CONTEXT
May be called from user, kernel or interrupt context.
EXAMPLES
int usb_addr;
usb_addr = usb_get_addr(dip);
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+--------------------+-------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-------------------+
|Architecture | PCI-based systems |
+--------------------+-------------------+
|Interface stability | Committed |
+--------------------+-------------------+
SEE ALSO
attributes(7), usb_pipe_xopen(9F)
September 16, 2016 USB_GET_ADDR(9F)