On Tue, Sep 16, 2008 at 15:06, Gordon Farquharson <[EMAIL PROTECTED]> wrote: > And some more information from Michael [1]. > > --- > Hello, > as I wrote in my last mail, I really think the bus numbers are changing. > So I think the patch by Gordon is at least not enough.
You are correct. I think that the bus numbers change depending on which of echi_hcd or ohci_hcd is loaded first. > #ls /sys/bus/usb/devices > 1-0:1.0 > 1-1 > 1-1:1.0 > 1-2 > 1-2:1.0 > 1-2.4 > 1-2.4:1.0 > 2-0:1.0 > 3-0:1.0 > usb1 > usb2 > usb3 In this case, I think that ehci_hcd was loaded first, so the high speed bus is numbered USB bus 1. 1-1 and 1-2 are high speed devices attached to the USB ports labeled Disk 1 and Disk 2 on the NSLU2 (the device attached to Disk 2 looks like it is a hub). You have no low speed devices attached to the NSLU2 which is why 2-1 and 3-1 aren't listed. I see this configuration with my NSLU2 running unstable. [42949379.090000] PCI: enabling device 0000:00:01.2 (0140 -> 0142) [42949379.100000] ehci_hcd 0000:00:01.2: EHCI Host Controller [42949379.100000] ehci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1 [42949379.140000] ehci_hcd 0000:00:01.2: irq 26, io mem 0x48002000 [42949379.160000] ehci_hcd 0000:00:01.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 [42949379.160000] usb usb1: configuration #1 chosen from 1 choice [42949379.170000] hub 1-0:1.0: USB hub found [42949379.180000] hub 1-0:1.0: 5 ports detected [42949379.290000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [42949379.300000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [42949379.300000] usb usb1: Product: EHCI Host Controller [42949379.310000] usb usb1: Manufacturer: Linux 2.6.26-1-ixp4xx ehci_hcd [42949379.320000] usb usb1: SerialNumber: 0000:00:01.2 done. [42949379.580000] usb 1-1: new high speed USB device using ehci_hcd and address 2 ... [42949401.780000] PCI: enabling device 0000:00:01.0 (0140 -> 0142) [42949401.790000] ohci_hcd 0000:00:01.0: OHCI Host Controller [42949401.790000] ohci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2 [42949401.800000] ohci_hcd 0000:00:01.0: irq 28, io mem 0x48000000 [42949401.910000] usb usb2: configuration #1 chosen from 1 choice [42949401.910000] hub 2-0:1.0: USB hub found [42949401.920000] hub 2-0:1.0: 3 ports detected [42949402.030000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 [42949402.030000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [42949402.040000] usb usb2: Product: OHCI Host Controller [42949402.050000] usb usb2: Manufacturer: Linux 2.6.26-1-ixp4xx ohci_hcd [42949402.050000] usb usb2: SerialNumber: 0000:00:01.0 [42949402.060000] PCI: enabling device 0000:00:01.1 (0140 -> 0142) [42949402.060000] ohci_hcd 0000:00:01.1: OHCI Host Controller [42949402.070000] ohci_hcd 0000:00:01.1: new USB bus registered, assigned bus number 3 [42949402.080000] ohci_hcd 0000:00:01.1: irq 27, io mem 0x48001000 [42949402.100000] input: ixp4xx beeper as /class/input/input0 [42949402.170000] usb usb3: configuration #1 chosen from 1 choice [42949402.170000] hub 3-0:1.0: USB hub found [42949402.180000] hub 3-0:1.0: 2 ports detected [42949402.200000] IXP4xx Queue Manager initialized. [42949402.290000] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 [42949402.290000] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [42949402.300000] usb usb3: Product: OHCI Host Controller [42949402.310000] usb usb3: Manufacturer: Linux 2.6.26-1-ixp4xx ohci_hcd [42949402.310000] usb usb3: SerialNumber: 0000:00:01.1 > #ls /sys/bus/usb/devices > 1-0:1.0 > 2-0:1.0 > 3-0:1.0 > 3-1 > 3-1:1.0 > 3-2 > 3-2:1.0 > 3-2.4 > 3-2.4:1.0 > usb1 > usb2 > usb3 In this case, I think that ohci_hcd was loaded first, so buses 1 and 2 are the slow (USB 1.1) hub. Again, you have two high speed devices attached to the NSLU2 which are now 3-1 and 3-2 because the high speed bus is USB bus number 3. I see this configuration with my NSLU2 running etch. ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI) PCI: enabling device 0000:00:01.0 (0140 -> 0142) ohci_hcd 0000:00:01.0: OHCI Host Controller ohci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 1 ohci_hcd 0000:00:01.0: irq 28, io mem 0x48000000 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 3 ports detected PCI: enabling device 0000:00:01.1 (0140 -> 0142) ohci_hcd 0000:00:01.1: OHCI Host Controller ohci_hcd 0000:00:01.1: new USB bus registered, assigned bus number 2 ohci_hcd 0000:00:01.1: irq 27, io mem 0x48001000 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 2 ports detected PCI: enabling device 0000:00:01.2 (0140 -> 0142) ehci_hcd 0000:00:01.2: EHCI Host Controller ehci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 3 ehci_hcd 0000:00:01.2: irq 26, io mem 0x48002000 ehci_hcd 0000:00:01.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb3: configuration #1 chosen from 1 choice hub 3-0:1.0: USB hub found hub 3-0:1.0: 5 ports detected usb 3-1: new high speed USB device using ehci_hcd and address 2 usb 3-1: configuration #1 chosen from 1 choice > My udev rules seems to work: > SUBSYSTEM=="usb", DEVPATH=="*/[13]-[12]", ACTION=="add", > PROGRAM="/usr/bin/leds disk-%n on" > SUBSYSTEM=="usb", DEVPATH=="*/[13]-[12]", ACTION=="remove", > PROGRAM="/usr/bin/leds disk-%n off" > > And I did not add similar rules regarding the slow hub. I'm going to try to find a nice way to handle all cases. As you correctly point out, the rules above are not complete, because they don't handle a USB 1.1 device attached to the port labeled Disk 1 in the case that ehci_hcd is loaded first because this device would be 2-1. Gordon -- Gordon Farquharson GnuPG Key ID: 32D6D676 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]