diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-04-27 22:54:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:48 -0400 |
commit | 7206b00164a1c3ca533e01db285955617e1019f8 (patch) | |
tree | d11f6a5a63238110d4b763661a76ca87761a2d02 /include/linux/usb.h | |
parent | e7b7717247f61e2cf18ec47f91999065c59d1607 (diff) |
USB: Add route string to struct usb_device.
This patch adds a hex route string to each USB device. The route string is used
by the USB 3.0 host controller to send packets through the device tree. USB 3.0
hubs use this string to route packets to the correct port. This is fundamental
bus change from USB 2.0, where all packets were broadcast across the bus.
Devices (including hubs) under a root port receive the route string 0x0. Every
four bits in the route string represent a port on a hub. This length works
because USB 3.0 hubs are limited to 15 ports, and USB 2.0 hubs (with potentially
more ports) will never see packets with a route string. A port number of 0
means the packet is destined for that hub.
For example, a peripheral device might have a route string of 0x00097.
This means the device is connected to port 9 of the hub at depth 1.
The hub at depth 1 is connected to port 7 of a hub at depth 0.
The hub at depth 0 is connected to a root port.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index fb1f2a32ae05..2b380a16c62f 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -362,6 +362,7 @@ struct usb_tt; | |||
362 | * struct usb_device - kernel's representation of a USB device | 362 | * struct usb_device - kernel's representation of a USB device |
363 | * @devnum: device number; address on a USB bus | 363 | * @devnum: device number; address on a USB bus |
364 | * @devpath: device ID string for use in messages (e.g., /port/...) | 364 | * @devpath: device ID string for use in messages (e.g., /port/...) |
365 | * @route: tree topology hex string for use with xHCI | ||
365 | * @state: device state: configured, not attached, etc. | 366 | * @state: device state: configured, not attached, etc. |
366 | * @speed: device speed: high/full/low (or error) | 367 | * @speed: device speed: high/full/low (or error) |
367 | * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub | 368 | * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub |
@@ -427,6 +428,7 @@ struct usb_tt; | |||
427 | struct usb_device { | 428 | struct usb_device { |
428 | int devnum; | 429 | int devnum; |
429 | char devpath [16]; | 430 | char devpath [16]; |
431 | u32 route; | ||
430 | enum usb_device_state state; | 432 | enum usb_device_state state; |
431 | enum usb_device_speed speed; | 433 | enum usb_device_speed speed; |
432 | 434 | ||