aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_ioctl.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2013-05-03 07:44:58 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2013-05-03 07:44:58 +0000
commitc77a24c24a844f32150345c9967c026a5a50da4c (patch)
treebae81f1e85342c7dae2df723f345aafb486ea339 /sys/dev/usb/usb_ioctl.h
parent3b48e348d5c2e70f071a75e37edac8c5eba8d478 (diff)
downloadsrc-c77a24c24a844f32150345c9967c026a5a50da4c.tar.gz
src-c77a24c24a844f32150345c9967c026a5a50da4c.zip
Add new USB API to get the port path of a USB device.
MFC after: 2 weeks Requested by: emaste @
Notes
Notes: svn path=/head/; revision=250201
Diffstat (limited to 'sys/dev/usb/usb_ioctl.h')
-rw-r--r--sys/dev/usb/usb_ioctl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_ioctl.h b/sys/dev/usb/usb_ioctl.h
index 979240f05734..4b7850a1a65b 100644
--- a/sys/dev/usb/usb_ioctl.h
+++ b/sys/dev/usb/usb_ioctl.h
@@ -131,6 +131,15 @@ struct usb_device_info {
char udi_release[8];
};
+#define USB_DEVICE_PORT_PATH_MAX 32
+
+struct usb_device_port_path {
+ uint8_t udp_bus; /* which bus we are on */
+ uint8_t udp_index; /* which device index */
+ uint8_t udp_port_level; /* how many levels: 0, 1, 2 ... */
+ uint8_t udp_port_no[USB_DEVICE_PORT_PATH_MAX];
+};
+
struct usb_device_stats {
uint32_t uds_requests_ok[4]; /* Indexed by transfer type UE_XXX */
uint32_t uds_requests_fail[4]; /* Indexed by transfer type UE_XXX */
@@ -277,7 +286,8 @@ struct usb_gen_quirk {
#define USB_IFACE_DRIVER_DETACH _IOW ('U', 125, int)
#define USB_GET_PLUGTIME _IOR ('U', 126, uint32_t)
#define USB_READ_DIR _IOW ('U', 127, struct usb_read_dir)
-/* 128 - 134 unused */
+/* 128 - 133 unused */
+#define USB_GET_DEV_PORT_PATH _IOR ('U', 134, struct usb_device_port_path)
#define USB_GET_POWER_USAGE _IOR ('U', 135, int)
#define USB_SET_TX_FORCE_SHORT _IOW ('U', 136, int)
#define USB_SET_TX_TIMEOUT _IOW ('U', 137, int)