[CentOS] Determine what physical port a USB device is attatched to

Wed Jun 4 03:59:17 UTC 2008
John R Pierce <pierce at hogranch.com>

Joseph L. Casale wrote:
>
> How does one do this? For example:
>
> # lspci | grep USB
>
> 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #4 (rev 02)
>
> 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #5 (rev 02)
>
> 00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #6 (rev 02)
>
> 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 
> EHCI Controller #2 (rev 02)
>
> 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #1 (rev 02)
>
> 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #2 (rev 02)
>
> 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB 
> UHCI Controller #3 (rev 02)
>
> 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 
> EHCI Controller #1 (rev 02)
>
> and
>
> # lsusb
>
> Bus 001 Device 001: ID 0000:0000
>
> Bus 001 Device 003: ID 051d:0002 American Power Conversion 
> Uninterruptible Power Supply
>
> Bus 004 Device 001: ID 0000:0000
>
> Bus 005 Device 001: ID 0000:0000
>
> Bus 007 Device 001: ID 0000:0000
>
> Bus 008 Device 001: ID 0000:0000
>
> Bus 002 Device 001: ID 0000:0000
>
> Bus 006 Device 001: ID 0000:0000
>
> Bus 003 Device 001: ID 0000:0000
>
> I thought an lspci –tv would help, but it doesn’t show the UPS?
>

the UPS isn't a PCI device. the USB channels on the motherboard are, 
however, thats what you see.

> ...
>
> So how do I know which controller has this device on it so I can 
> enumerate the PCI ID of that controller?
>

the UPS doesn't HAVE a PCI ID, its not on PCI, its on USB.
"Buss 001" means its on USB Controller 1, which is PCI ID 
(bus:slot.func): 00:1d.0
Use lspci -vn if you want to see the vendor/device codes are for 00:1d.0 
(probably be 8086:xxxx) instead of the symbolic names shown above.

00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI 
Controller #1 (rev 02)
\____-> Bus 001 Device 003: ID 051d:0002 American Power Conversion 
Uninterruptible Power Supply