[<<][usb][>>][..]
Fri Aug 9 12:50:33 EDT 2013

USB linux

Makes little sense to me how topology is organized.

What's the difference between:
- bus
- hub
- port
- the "usb b-x.y.z" in dmesg

The x.y.z seems to be port numbers, i.e. physical topology.
The b- seems to be bus number.

How does a device get associated to a bus?
Aha, I think I get it.

- Busses are different host controllers, which in Linux have an
  associated "root hub" virtual hub.  

  tom@zoo:/dev/bus/usb$ lspci |grep USB
  00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
  00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
  00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
  00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
  00:14.5 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
  00:16.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
  00:16.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller

  tom@zoo:/dev/bus/usb$ lsusb |grep root
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

  Q: why are some 12M (OHCI, USB1.1) and others 480M (EHCI, USB2.0) ?

  It seems that a port is mapped either to an OHCI bus or a EHCI bus,
  depending on the kind of device it attaches to.

  Q: what's the difference between OHCI0 and OHCI2


- Not all root hubs have an equal amount of ports:

  lsusb -t |grep root_hub
  /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/4p, 12M
  /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
  /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
  /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
  /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M
  /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
  /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M

  Pairing them 12M/480M, there is one that's special: 2p 12M Bus 06,
  which doesn't seem to have any devices attached.

  The other ones are 4+5+5, 14 physical ports?  I count 12 physical
  ports.  At least one internal one for the card reader, so there is
  probably a second internal one.


- Some 7-port hubs are actually two 4-port hubs:
  0409:005a "NEC Corp. HighSpeed Hub"       x 2 = Tripp Lite 7-Port USB 2.0 Hub
  05e3:0610 "Genesys Logic, Inc. 4-port hub x 2 = D-Link Hi-Speed USB 2.0 7-Port Powered Hub (DUB-H7)



TOPOLOGY:

tom@zoo:/dev/bus/usb$ lsusb -t
5-2.1:1.1: No such file or directory
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/4p, 12M
    |__ Port 1: Dev 2, If 0, Class=vend., Driver=pl2303, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/2p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
    |__ Port 2: Dev 3, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=stor., Driver=usb-storage, 480M
        |__ Port 1: Dev 5, If 1, Class=vend., Driver=, 480M
        |__ Port 3: Dev 6, If 0, Class=vend., Driver=ftdi_sio, 12M
        |__ Port 4: Dev 7, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 8, If 0, Class=vend., Driver=usbfs, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M
    |__ Port 1: Dev 2, If 0, Class=stor., Driver=usb-storage, 480M
    |__ Port 3: Dev 3, If 0, Class=stor., Driver=usb-storage, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/5p, 480M
    |__ Port 2: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 5, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 15, If 0, Class=print, Driver=usbfs, 480M
    |__ Port 5: Dev 3, If 0, Class=hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 6, If 0, Class=hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 19, If 0, Class=>ifc, Driver=usbfs, 12M
            |__ Port 4: Dev 9, If 0, Class=hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 10, If 0, Class=HID, Driver=usbhid, 1.5M
                |__ Port 4: Dev 11, If 0, Class=HID, Driver=usbhid, 1.5M

DEVICES:

tom@zoo:/dev/bus/usb$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 002: ID 04e8:6014 Samsung Electronics Co., Ltd 
Bus 003 Device 003: ID 1307:0330 Transcend Information, Inc. 63-in-1 Multi-Card Reader/Writer
Bus 005 Device 003: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 007 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 015: ID 04f9:0045 Brother Industries, Ltd 
Bus 001 Device 005: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 006: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 005 Device 005: ID 18d1:4e12 Google Inc. Nexus One (debug)
Bus 005 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 005 Device 007: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 019: ID 1a1e:9000  
Bus 001 Device 009: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 005 Device 008: ID 1366:0101 SEGGER J-Link ARM
Bus 001 Device 010: ID 03f9:0100 KeyTronic Corp. KT-2001 Keyboard
Bus 001 Device 011: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical




[Reply][About]
[<<][usb][>>][..]