Debian Bug report logs - #497305
nslu2-utils: The disk leds aren't triggered when a device is plugged into

version graph

Package: nslu2-utils; Maintainer for nslu2-utils is Joey Hess <joeyh@debian.org>; Source for nslu2-utils is src:nslu2-utils.

Reported by: "ihate you" <i.filter.your.spam@gmail.com>

Date: Sun, 31 Aug 2008 18:21:02 UTC

Severity: normal

Tags: patch

Found in version nslu2-utils/20080403-2

Fixed in version nslu2-utils/20080403-3

Done: Martin Michlmayr <tbm@cyrius.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "ihate you" <i.filter.your.spam@gmail.com>:
New Bug report received and forwarded. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "ihate you" <i.filter.your.spam@gmail.com>
To: submit@bugs.debian.org
Subject: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Sun, 31 Aug 2008 20:17:48 +0200
[Message part 1 (text/plain, inline)]
Package: nslu2-utils
Version: 20080403-2
Severity: normal
Tags: patch

The disk leds doesn't work on my system.
With the corrected udev rule the leds should work like expected.
(USB device is plugged into USB port 1 disk led 1 comes on)


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: arm (armv5tel)

Kernel: Linux 2.6.25-2-ixp4xx
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages nslu2-utils depends on:
ii  devio                       1.2-1        correctly read (or write) a
region
ii  flash-kernel                1.11         utility to write kernel and
initra
ii  slugimage                   1:0.0+r104-5 NSLU2 firmware image
manipulation

nslu2-utils recommends no packages.

Versions of packages nslu2-utils suggests:
ii  beep                          1.2.2-22   advanced pc-speaker beeper

-- no debconf information

--===============1017271839==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="z60_nslu2-led.rules.patch"

--- /home/bb/share/z60_nslu2-led.rules.orig    2008-07-15 18:33:48.000000000
+0200
+++ /etc/udev/rules.d/z60_nslu2-led.rules    2008-08-31 18:45:12.000000000
+0200
@@ -1,2 +1,2 @@
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"
+SUBSYSTEM=="usb", DEVPATH=="*/usb1/1-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
+SUBSYSTEM=="usb", DEVPATH=="*/usb1/1-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"

--===============1017271839==--
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to Martin Michlmayr <tbm@cyrius.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #10 received at 497305@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: ihate you <i.filter.your.spam@gmail.com>, 497305@bugs.debian.org
Cc: Gordon Farquharson <gordonfarquharson@gmail.com>
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Sun, 14 Sep 2008 11:16:33 +0300
* ihate you <i.filter.your.spam@gmail.com> [2008-08-31 20:17]:
> The disk leds doesn't work on my system.
> With the corrected udev rule the leds should work like expected.
> (USB device is plugged into USB port 1 disk led 1 comes on)

Gordon, can you verify that this patch is needed and correct?
-- 
Martin Michlmayr
http://www.cyrius.com/




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to Martin Michlmayr <tbm@cyrius.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #15 received at 497305@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: 497305@bugs.debian.org
Subject: [neues.nx6c4@glockenstein.de: Re: R: beep on slug]
Date: Mon, 15 Sep 2008 10:03:40 +0300
FYI

----- Forwarded message from Michael Glockenstein <neues.nx6c4@glockenstein.de> -----

From: Michael Glockenstein <neues.nx6c4@glockenstein.de>
Subject: Re: R: beep on slug
Date: Sun, 14 Sep 2008 11:09:02 +0200
To: debian-arm@lists.debian.org
User-Agent: KNode/0.10.4

Martin Michlmayr schrieb am Sonntag, 14. September 2008 10:30:

> * Martin Michlmayr <tbm@cyrius.com> [2008-09-13 11:06]:
>> > Martin/Joey, can we get this fixed before lenny is released?
>> 
>> I'm not sure who maintains nslu2-utils these days, but I agree it
>> would be worthwhile to fix this as well as the USB disk light bug.

Hello,
I don't have the mail with the disk light bug anymore, so I want answer
here.

I changed the udev rules like suggested to

SUBSYSTEM=="usb", DEVPATH=="*/usb1/1-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
SUBSYSTEM=="usb", DEVPATH=="*/usb1/1-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"

and first it worked for me but since yesterday it fails again.
I do not understand much of udev, but I think the bus number
is not constant.

Now again the following is working:
SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"

Regards Michael


-- 
To UNSUBSCRIBE, email to debian-arm-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

----- End forwarded message -----

-- 
Martin Michlmayr
http://www.cyrius.com/




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #20 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Martin Michlmayr" <tbm@cyrius.com>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Mon, 15 Sep 2008 01:06:51 -0600
On Sun, Sep 14, 2008 at 02:16, Martin Michlmayr <tbm@cyrius.com> wrote:
> * ihate you <i.filter.your.spam@gmail.com> [2008-08-31 20:17]:
>> The disk leds doesn't work on my system.
>> With the corrected udev rule the leds should work like expected.
>> (USB device is plugged into USB port 1 disk led 1 comes on)
>
> Gordon, can you verify that this patch is needed and correct?

The udev rule currently in nslu2-utils isn't general enough. From the
NSLU2 wiki [1],

---

The hole labeled "Disk 1" is port 0 of the fast hub (bus 1) and port 0
of the first slow hub (bus 2). The hole labeled "Disk 2" port 1 of the
fast hub (bus 1) and port 0 of the second slow hub (bus 3)

                bus  port
  Disk 1  fast   1    0
          slow   2    0
  Disk 2  fast   1    1
          slow   3    0

---

Therefore, the udev rules should therefore illuminate the Disk 1 LED
if a device is attached to either port 0 of bus 1 or port 0 of bus 2.
The Disk 2 LED should be illuminated if a device is attached to port 1
of bus 0 or port 0 of bus 3. It seems that in /sys/bus/usb/devices,
the port numbers actually start at 1 and not 0 (I think) [2].

I think that by default, nslu2-utils only needs to support a standard
NSLU2 configuration. NSLU2s that have been hacked to obtain access to
additional USB ports or use one of the other ports to replace a broken
port are non standard, and in either of these cases, the user will
need to decide which LED to manipulate. With this stipulation, the
following udev patch to the udev rules should work.

--- z60_nslu2-led.rules.orig	2008-09-15 00:17:41.000000000 -0600
+++ z60_nslu2-led.rules	2008-09-15 00:54:26.000000000 -0600
@@ -1,2 +1,12 @@
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"
+# Turn Disk 1 LED on
+SUBSYSTEM=="usb", DEVPATH=="*/1-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-1 on"
+SUBSYSTEM=="usb", DEVPATH=="*/2-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-1 on"
+# Turn Disk 2 LED on
+SUBSYSTEM=="usb", DEVPATH=="*/1-2", ACTION=="add",
PROGRAM="/usr/bin/leds disk-2 on"
+SUBSYSTEM=="usb", DEVPATH=="*/3-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-2 on"
+# Turn Disk 1 LED off
+SUBSYSTEM=="usb", DEVPATH=="*/1-1", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-1 off"
+SUBSYSTEM=="usb", DEVPATH=="*/2-1", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-1 off"
+# Turn Disk 2 LED off
+SUBSYSTEM=="usb", DEVPATH=="*/1-2", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-2 off"
+SUBSYSTEM=="usb", DEVPATH=="*/3-1", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-2 off"

This patch does rely on the USB bus numbers being consistent. I
haven't checked this assumption thoroughly yet.

Gordon

[1] http://www.nslu2-linux.org/wiki/Info/USBSlotsAndBuses
[2] http://www.linux-usb.org/FAQ.html

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to Bob Cox <debian-bugs@info.bobcox.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #25 received at 497305@bugs.debian.org (full text, mbox):

From: Bob Cox <debian-bugs@info.bobcox.com>
To: 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Mon, 15 Sep 2008 17:17:39 +0100
As requested elsewhere by Gordon, I have tested his patch and it
certainly works perfectly for me.  Many thanks!

-- 
Bob Cox.  Stoke Gifford, near Bristol, UK.




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #30 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Martin Michlmayr" <tbm@cyrius.com>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Michael Glockenstein" <neues.nx6c4@glockenstein.de>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Tue, 16 Sep 2008 15:04:08 -0600
On Mon, Sep 15, 2008 at 01:06, Gordon Farquharson
<gordonfarquharson@gmail.com> wrote:

> Therefore, the udev rules should therefore illuminate the Disk 1 LED
> if a device is attached to either port 0 of bus 1 or port 0 of bus 2.
> The Disk 2 LED should be illuminated if a device is attached to port 1
> of bus 0 or port 0 of bus 3. It seems that in /sys/bus/usb/devices,
> the port numbers actually start at 1 and not 0 (I think) [2].
>
> I think that by default, nslu2-utils only needs to support a standard
> NSLU2 configuration. NSLU2s that have been hacked to obtain access to
> additional USB ports or use one of the other ports to replace a broken
> port are non standard, and in either of these cases, the user will
> need to decide which LED to manipulate. With this stipulation, the
> following udev patch to the udev rules should work.

Here is some additional information on this bug from Michael
Glockenstein. This email was originally posted to debian-arm [1].

---
Hello Gordon, that's what in my devices directory:
# 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

I don't know what are the right names to use now, are you really sure
regarding the names in your patch, I don't see a 2-1 or 3-1 device here.

But with the following
#ls /sys/class/usb_device
usbdev1.1  usbdev1.2  usbdev1.23  usbdev1.24  usbdev2.1  usbdev3.1
I can see them.

So what is the right directory for udev, and why it is not noted exactly in
the rules and a wildcard is used?

And today the lights are off, because yesterday they were at 3-1/3-2 (so
at least I remember) and today again 1-1/1-2.
So I think it is a bus numbering problem and changed my rules to
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"

I will further investigate.

Regards Michael
---

[1] http://lists.debian.org/debian-arm/2008/09/msg00083.html

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #35 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Martin Michlmayr" <tbm@cyrius.com>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Michael Glockenstein" <neues.nx6c4@glockenstein.de>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Tue, 16 Sep 2008 15:06:31 -0600
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.

#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

#halt
(start the slug again then)

#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

Maybe I am wrong, but do you see the difference with the filenames
without the end of :1.0,
first 1-1, 1-2 and 1-2.4
then 3-1, 3-2 and 3-2.4?

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.

Regards Michael
---

Gordon

[1] http://lists.debian.org/debian-arm/2008/09/msg00087.html

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #40 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Michael Glockenstein" <neues.nx6c4@glockenstein.de>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Martin Michlmayr" <tbm@cyrius.com>, "Bob Cox" <debian-bugs@info.bobcox.com>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Tue, 16 Sep 2008 16:51:31 -0600
Hi Michael

Thanks very much for the information you sent. Could you also send the
contents of your /proc/bus/usb/devices, and a directory listing of
/sys/bus/usb/devices (if the device numbers have changed again).

Gordon

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #45 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Michael Glockenstein" <neues.nx6c4@glockenstein.de>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Martin Michlmayr" <tbm@cyrius.com>, "Bob Cox" <debian-bugs@info.bobcox.com>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Tue, 16 Sep 2008 21:30:04 -0600
Hi Michael

On Tue, Sep 16, 2008 at 16:51, Gordon Farquharson
<gordonfarquharson@gmail.com> wrote:

> Thanks very much for the information you sent. Could you also send the
> contents of your /proc/bus/usb/devices, and a directory listing of
> /sys/bus/usb/devices (if the device numbers have changed again).

Also, it would be great if you could post the output of dmesg.

Thanks.

Gordon

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. (Sat, 20 Sep 2008 16:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sat, 20 Sep 2008 16:51:03 GMT) Full text and rfc822 format available.

Message #50 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: "Michael Glockenstein" <neues.nx6c4@glockenstein.de>
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Martin Michlmayr" <tbm@cyrius.com>, "Bob Cox" <debian-bugs@info.bobcox.com>, 497305@bugs.debian.org
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Sat, 20 Sep 2008 10:49:25 -0600
On Tue, Sep 16, 2008 at 15:06, Gordon Farquharson
<gordonfarquharson@gmail.com> 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




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. (Sun, 21 Sep 2008 03:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Gordon Farquharson" <gordonfarquharson@gmail.com>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sun, 21 Sep 2008 03:18:02 GMT) Full text and rfc822 format available.

Message #55 received at 497305@bugs.debian.org (full text, mbox):

From: "Gordon Farquharson" <gordonfarquharson@gmail.com>
To: 497305@bugs.debian.org
Cc: "ihate you" <i.filter.your.spam@gmail.com>, "Martin Michlmayr" <tbm@cyrius.com>, "Bob Cox" <debian-bugs@info.bobcox.com>, "Michael Glockenstein" <neues.nx6c4@glockenstein.de>
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Sat, 20 Sep 2008 21:14:27 -0600
On Sat, Sep 20, 2008 at 10:49, Gordon Farquharson
<gordonfarquharson@gmail.com> wrote:

> 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.

I think that the following rules handle all cases. The rules are based
on the observation that the USB hubs in the NSLU2 always have the same
PCI device IDs, namely

$ lspci
00:01.0 USB Controller: NEC Corporation USB (rev 43)
00:01.1 USB Controller: NEC Corporation USB (rev 43)
00:01.2 USB Controller: NEC Corporation USB 2.0 (rev 04)

--- z60_nslu2-led.rules.orig	2008-09-15 00:17:41.000000000 -0600
+++ z60_nslu2-led.rules	2008-09-20 20:58:14.000000000 -0600
@@ -1,2 +1,15 @@
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="add",
PROGRAM="/usr/bin/leds disk-%n on"
-SUBSYSTEM=="usb", DEVPATH=="*/usb3/3-[12]", ACTION=="remove",
PROGRAM="/usr/bin/leds disk-%n off"
+# USB 1.x device attached to or removed from NSLU2 USB port "Disk 1"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.0/usb*/?-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-1 on"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.0/usb*/?-1",
ACTION=="remove", PROGRAM="/usr/bin/leds disk-1 off"
+
+# USB 1.x device attached to or removed from NSLU2 USB port "Disk 2"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.1/usb*/?-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-2 on"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.1/usb*/?-1",
ACTION=="remove", PROGRAM="/usr/bin/leds disk-2 off"
+
+# USB 2.0 device attached to or removed from NSLU2 USB port "Disk 1"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.2/usb*/?-1", ACTION=="add",
PROGRAM="/usr/bin/leds disk-1 on"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.2/usb*/?-1",
ACTION=="remove", PROGRAM="/usr/bin/leds disk-1 off"
+
+# USB 2.0 device attached to or removed from NSLU2 USB port "Disk 2"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.2/usb*/?-2", ACTION=="add",
PROGRAM="/usr/bin/leds disk-2 on"
+SUBSYSTEM=="usb",
DEVPATH=="/devices/pci0000:00/0000:00:01.2/usb*/?-2",
ACTION=="remove", PROGRAM="/usr/bin/leds disk-2 off"

If you are able, please test these rules, and update this bug report
with your results. I've tested them on my test NSLU2 with 1.x and 2.0
USB devices on each port, and the rules seem to work.

Thanks.

Gordon

-- 
Gordon Farquharson
GnuPG Key ID: 32D6D676




Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#497305; Package nslu2-utils. (Sun, 21 Sep 2008 12:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Glockenstein <neues.nx6c4@glockenstein.de>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. (Sun, 21 Sep 2008 12:33:05 GMT) Full text and rfc822 format available.

Message #60 received at 497305@bugs.debian.org (full text, mbox):

From: Glockenstein <neues.nx6c4@glockenstein.de>
To: 497305@bugs.debian.org
Cc: "Gordon Farquharson" <gordonfarquharson@gmail.com>, "ihate you" <i.filter.your.spam@gmail.com>, "Martin Michlmayr" <tbm@cyrius.com>, "Bob Cox" <debian-bugs@info.bobcox.com>
Subject: Re: Bug#497305: nslu2-utils: The disk leds aren't triggered when a device is plugged into
Date: Sun, 21 Sep 2008 14:28:20 +0200
Gordon Farquharson schrieb am Sonntag, 21. September 2008 05:14:
> If you are able, please test these rules, and update this bug report
> with your results. I've tested them on my test NSLU2 with 1.x and 2.0
> USB devices on each port, and the rules seem to work.

At least for my fast usb configuration it works after the first reboot.
Regards Michael




Reply sent to Martin Michlmayr <tbm@cyrius.com>:
You have taken responsibility. (Mon, 29 Sep 2008 16:30:04 GMT) Full text and rfc822 format available.

Notification sent to "ihate you" <i.filter.your.spam@gmail.com>:
Bug acknowledged by developer. (Mon, 29 Sep 2008 16:30:05 GMT) Full text and rfc822 format available.

Message #65 received at 497305-close@bugs.debian.org (full text, mbox):

From: Martin Michlmayr <tbm@cyrius.com>
To: 497305-close@bugs.debian.org
Subject: Bug#497305: fixed in nslu2-utils 20080403-3
Date: Mon, 29 Sep 2008 16:02:09 +0000
Source: nslu2-utils
Source-Version: 20080403-3

We believe that the bug you reported is fixed in the latest version of
nslu2-utils, which is due to be installed in the Debian FTP archive:

nslu2-utils_20080403-3.dsc
  to pool/main/n/nslu2-utils/nslu2-utils_20080403-3.dsc
nslu2-utils_20080403-3.tar.gz
  to pool/main/n/nslu2-utils/nslu2-utils_20080403-3.tar.gz
nslu2-utils_20080403-3_armel.deb
  to pool/main/n/nslu2-utils/nslu2-utils_20080403-3_armel.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 497305@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Michlmayr <tbm@cyrius.com> (supplier of updated nslu2-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 29 Sep 2008 18:31:33 +0300
Source: nslu2-utils
Binary: nslu2-utils
Architecture: source armel
Version: 20080403-3
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <joeyh@debian.org>
Changed-By: Martin Michlmayr <tbm@cyrius.com>
Description: 
 nslu2-utils - utilities and init scripts for the Linksys NSLU2
Closes: 481535 497305 498987
Changes: 
 nslu2-utils (20080403-3) unstable; urgency=low
 .
   [ Martin Michlmayr ]
   * Don't call flash-kernel in the postinst because update-initramfs
     (which is also called in the postinst) calls flash-kernel now.
     Closes: #498987
 .
   [ Gordon Farquharson ]
   * Find the input device via /sys instead of hardcoding it. Closes: #481535
   * Update the disk LED udev rule to work with USB 1.x and 2.0 devices.
     Closes: #497305
Checksums-Sha1: 
 627e914f78d1c2c0ec7e2d63ae60f61103881f18 893 nslu2-utils_20080403-3.dsc
 6a9a192da752c8090dafa5c4bf6bedd148aadf3d 44910 nslu2-utils_20080403-3.tar.gz
 b39cdf18e8360b9a56e6cbce6e0e3733a913a98e 15572 nslu2-utils_20080403-3_armel.deb
Checksums-Sha256: 
 e1689e9443d3c1e9ac284928966027869780a8419b38a8f155e936a808882fd6 893 nslu2-utils_20080403-3.dsc
 71b3e3732e971855b9727437ad724526fd9988fbff2a935f0720645c0e015eaf 44910 nslu2-utils_20080403-3.tar.gz
 70558f86359d73d47d86b3a0a480bd12e66e55e7dc6d4b5c19d3a5f5ce4f83b8 15572 nslu2-utils_20080403-3_armel.deb
Files: 
 fd03760dd65bc3830e4e8c4a82bed994 893 admin extra nslu2-utils_20080403-3.dsc
 9e23f3496196f5a2d6ecfe59f9f2e8ee 44910 admin extra nslu2-utils_20080403-3.tar.gz
 0499285ace60686166c564a8a6a6f119 15572 admin extra nslu2-utils_20080403-3_armel.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkjg+CQACgkQKb5dImj9VJ8EnwCfY23gRrekh5psnNDwIEX2nl/7
Sq4AniTN4cxgADZRrrN6xggraiXih9MR
=lKSW
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 11 Nov 2008 07:25:24 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 01:45:13 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.