diff options
-rw-r--r-- | Documentation/usb/proc_usb_info.txt | 34 | ||||
-rw-r--r-- | drivers/usb/core/devices.c | 11 |
2 files changed, 29 insertions, 16 deletions
diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt index fafcd4723260..afe596d5f201 100644 --- a/Documentation/usb/proc_usb_info.txt +++ b/Documentation/usb/proc_usb_info.txt | |||
@@ -1,12 +1,17 @@ | |||
1 | /proc/bus/usb filesystem output | 1 | /proc/bus/usb filesystem output |
2 | =============================== | 2 | =============================== |
3 | (version 2003.05.30) | 3 | (version 2010.09.13) |
4 | 4 | ||
5 | 5 | ||
6 | The usbfs filesystem for USB devices is traditionally mounted at | 6 | The usbfs filesystem for USB devices is traditionally mounted at |
7 | /proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as | 7 | /proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as |
8 | the /proc/bus/usb/BBB/DDD files. | 8 | the /proc/bus/usb/BBB/DDD files. |
9 | 9 | ||
10 | In many modern systems the usbfs filsystem isn't used at all. Instead | ||
11 | USB device nodes are created under /dev/usb/ or someplace similar. The | ||
12 | "devices" file is available in debugfs, typically as | ||
13 | /sys/kernel/debug/usb/devices. | ||
14 | |||
10 | 15 | ||
11 | **NOTE**: If /proc/bus/usb appears empty, and a host controller | 16 | **NOTE**: If /proc/bus/usb appears empty, and a host controller |
12 | driver has been linked, then you need to mount the | 17 | driver has been linked, then you need to mount the |
@@ -106,8 +111,8 @@ Legend: | |||
106 | 111 | ||
107 | Topology info: | 112 | Topology info: |
108 | 113 | ||
109 | T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd | 114 | T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd |
110 | | | | | | | | | |__MaxChildren | 115 | | | | | | | | | |__MaxChildren |
111 | | | | | | | | |__Device Speed in Mbps | 116 | | | | | | | | |__Device Speed in Mbps |
112 | | | | | | | |__DeviceNumber | 117 | | | | | | | |__DeviceNumber |
113 | | | | | | |__Count of devices at this level | 118 | | | | | | |__Count of devices at this level |
@@ -120,8 +125,13 @@ T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd | |||
120 | Speed may be: | 125 | Speed may be: |
121 | 1.5 Mbit/s for low speed USB | 126 | 1.5 Mbit/s for low speed USB |
122 | 12 Mbit/s for full speed USB | 127 | 12 Mbit/s for full speed USB |
123 | 480 Mbit/s for high speed USB (added for USB 2.0) | 128 | 480 Mbit/s for high speed USB (added for USB 2.0); |
129 | also used for Wireless USB, which has no fixed speed | ||
130 | 5000 Mbit/s for SuperSpeed USB (added for USB 3.0) | ||
124 | 131 | ||
132 | For reasons lost in the mists of time, the Port number is always | ||
133 | too low by 1. For example, a device plugged into port 4 will | ||
134 | show up with "Port=03". | ||
125 | 135 | ||
126 | Bandwidth info: | 136 | Bandwidth info: |
127 | B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd | 137 | B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd |
@@ -291,7 +301,7 @@ Here's an example, from a system which has a UHCI root hub, | |||
291 | an external hub connected to the root hub, and a mouse and | 301 | an external hub connected to the root hub, and a mouse and |
292 | a serial converter connected to the external hub. | 302 | a serial converter connected to the external hub. |
293 | 303 | ||
294 | T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 | 304 | T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 |
295 | B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0 | 305 | B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0 |
296 | D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | 306 | D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 |
297 | P: Vendor=0000 ProdID=0000 Rev= 0.00 | 307 | P: Vendor=0000 ProdID=0000 Rev= 0.00 |
@@ -301,21 +311,21 @@ C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA | |||
301 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub | 311 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub |
302 | E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms | 312 | E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms |
303 | 313 | ||
304 | T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 | 314 | T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 |
305 | D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | 315 | D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 |
306 | P: Vendor=0451 ProdID=1446 Rev= 1.00 | 316 | P: Vendor=0451 ProdID=1446 Rev= 1.00 |
307 | C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA | 317 | C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA |
308 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub | 318 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub |
309 | E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms | 319 | E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms |
310 | 320 | ||
311 | T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 | 321 | T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 |
312 | D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | 322 | D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 |
313 | P: Vendor=04b4 ProdID=0001 Rev= 0.00 | 323 | P: Vendor=04b4 ProdID=0001 Rev= 0.00 |
314 | C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA | 324 | C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA |
315 | I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse | 325 | I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse |
316 | E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms | 326 | E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms |
317 | 327 | ||
318 | T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 | 328 | T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 |
319 | D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 | 329 | D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 |
320 | P: Vendor=0565 ProdID=0001 Rev= 1.08 | 330 | P: Vendor=0565 ProdID=0001 Rev= 1.08 |
321 | S: Manufacturer=Peracom Networks, Inc. | 331 | S: Manufacturer=Peracom Networks, Inc. |
@@ -330,12 +340,12 @@ E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl= 8ms | |||
330 | Selecting only the "T:" and "I:" lines from this (for example, by using | 340 | Selecting only the "T:" and "I:" lines from this (for example, by using |
331 | "procusb ti"), we have: | 341 | "procusb ti"), we have: |
332 | 342 | ||
333 | T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 | 343 | T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 |
334 | T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 | 344 | T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4 |
335 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub | 345 | I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub |
336 | T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 | 346 | T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 |
337 | I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse | 347 | I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse |
338 | T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 | 348 | T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 |
339 | I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial | 349 | I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial |
340 | 350 | ||
341 | 351 | ||
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index 3449742c00e1..ddb4dc980923 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -66,8 +66,8 @@ | |||
66 | #define ALLOW_SERIAL_NUMBER | 66 | #define ALLOW_SERIAL_NUMBER |
67 | 67 | ||
68 | static const char *format_topo = | 68 | static const char *format_topo = |
69 | /* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */ | 69 | /* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd */ |
70 | "\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n"; | 70 | "\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%-4s MxCh=%2d\n"; |
71 | 71 | ||
72 | static const char *format_string_manufacturer = | 72 | static const char *format_string_manufacturer = |
73 | /* S: Manufacturer=xxxx */ | 73 | /* S: Manufacturer=xxxx */ |
@@ -520,11 +520,14 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, | |||
520 | speed = "1.5"; break; | 520 | speed = "1.5"; break; |
521 | case USB_SPEED_UNKNOWN: /* usb 1.1 root hub code */ | 521 | case USB_SPEED_UNKNOWN: /* usb 1.1 root hub code */ |
522 | case USB_SPEED_FULL: | 522 | case USB_SPEED_FULL: |
523 | speed = "12 "; break; | 523 | speed = "12"; break; |
524 | case USB_SPEED_WIRELESS: /* Wireless has no real fixed speed */ | ||
524 | case USB_SPEED_HIGH: | 525 | case USB_SPEED_HIGH: |
525 | speed = "480"; break; | 526 | speed = "480"; break; |
527 | case USB_SPEED_SUPER: | ||
528 | speed = "5000"; break; | ||
526 | default: | 529 | default: |
527 | speed = "?? "; | 530 | speed = "??"; |
528 | } | 531 | } |
529 | data_end = pages_start + sprintf(pages_start, format_topo, | 532 | data_end = pages_start + sprintf(pages_start, format_topo, |
530 | bus->busnum, level, parent_devnum, | 533 | bus->busnum, level, parent_devnum, |