Skip to contentSkip to conversation

2.6.13 breaks udev rule

DISCUSSION Jim McCloskey 3 participants 4 messages Sep 4, 2005

lore
Share & tools
lore
#0 lore raw

Hello. This simple rule for my Sandisk Minicruizer:

BUS="usb", SYSFS{serial}="0000183546", NAME="%k", SYMLINK="sandisk"

worked without problem under the 2.6.11 kernels, but ceased to work as soon as I upgraded to 2.6.13. There was no other change in hardware or software. Under 2.6.13 hotplug creates /dev/sda1, but udev does not create the /dev/sandisk link. Mounting /dev/sda1 by hand works fine. Substituting this rule:

BUS="scsi", SYSFS{vendor}="Generic*", NAME="%k", SYMLINK="sandisk"

works, but it's hardly the best rule.

When I probed a bit, it turned out that none of the USB keys worked under 2.6.13. And in fact, for this device, udevinfo (and so presumably udev) `sees' only the scsi part of the /sys/ directory tree. This is the total output:

device '/sys/block/sda' has major:minor 8:0
looking at class device '/sys/block/sda':

    SUBSYSTEM="block"
    SYSFS{dev}="8:0"
    SYSFS{range}="16"
    SYSFS{removable}="1"
    SYSFS{size}="256000"
    SYSFS{stat}="1        0        8        1        0        0        0        0        0        1        1"

follow the class device's "device"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host1/target1:0:0/1:0:0:0':

    BUS="scsi"
    ID="1:0:0:0"
    DRIVER="sd"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0xa"
    SYSFS{ioerr_cnt}="0x1"
    SYSFS{iorequest_cnt}="0xa"
    SYSFS{max_sectors}="240"
    SYSFS{model}="STORAGE DEVICE  "
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}="0026"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="Generic "

where the same command run under 2.6.11 yields much much more information (all the `usb' bus sections).

This must in turn be related to another difference between 2.6.11 and 2.6.13---namely, that the /sys/bus/usb/devices trees are quite different under the two kernels:

/sys/bus/usb/devices, 2.6.13:

lrwxrwxrwx  1 root root 0 2005-09-03 15:55 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1/1-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:55 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.1/usb2/2-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:55 3-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.2/usb3/3-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:55 4-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.3/usb4/4-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:55 5-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.7/usb5/5-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 5-1 -> ../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 5-1:1.0 -> ../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 usb1 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 usb2 -> ../../../devices/pci0000:00/0000:00:1d.1/usb2
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 usb3 -> ../../../devices/pci0000:00/0000:00:1d.2/usb3
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 usb4 -> ../../../devices/pci0000:00/0000:00:1d.3/usb4
lrwxrwxrwx  1 root root 0 2005-09-03 15:59 usb5 -> ../../../devices/pci0000:00/0000:00:1d.7/usb5

/sys/bus/usb/devices, 2.6.11:

lrwxrwxrwx  1 root root 0 2005-09-03 15:05 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1/1-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:25 1-2 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1/1-2
lrwxrwxrwx  1 root root 0 2005-09-03 15:26 1-2:1.0 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.1/usb2/2-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 3-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.2/usb3/3-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 4-0:1.0 -> ../../../devices/pci0000:00/0000:00:1d.3/usb4/4-0:1.0
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 usb1 -> ../../../devices/pci0000:00/0000:00:1d.0/usb1
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 usb2 -> ../../../devices/pci0000:00/0000:00:1d.1/usb2
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 usb3 -> ../../../devices/pci0000:00/0000:00:1d.2/usb3
lrwxrwxrwx  1 root root 0 2005-09-03 15:05 usb4 ->../../../devices/pci0000:00/0000:00:1d.3/usb4

2.6.13 creates usb5 while 2.6.11 doesn't, and it looks like udev does not have access to the information in the usb5 subdirectory. The sandisk is:

/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0 under 2.6.11

/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0 under 2.6.13

This is udev 056 from Debian stable/testing (068 is in unstable).

Is this a problem that would be solved by upgrading, or is there something else going on? I'd be very grateful indeed for any advice or information. Thanks to all,

Jim

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 6 lines · Jim McCloskey

Hello. This simple rule for my Sandisk Minicruizer:

BUS="usb", SYSFS{serial}="0000183546", NAME="%k", SYMLINK="sandisk"

worked without problem under the 2.6.11 kernels, but ceased to work as soon as I upgraded to 2.6.13.

...

Quoted 8 lines
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="30"
    SYSFS{type}="0"
    SYSFS{vendor}="Generic "

where the same command run under 2.6.11 yields much much more information (all the `usb' bus sections).

There shouldn't be a difference between these kernel versions. Are you sure that this happens for the _first_ connect after a reboot in both cases? 2.6.13 works without any problem for me.

Quoted 1 line

This is udev 056 from Debian stable/testing (068 is in unstable).

056 is definitely too old for this kernel version.

Kay

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Jim McCloskey
Quoted 1 line · Jim McCloskey

This is udev 056 from Debian stable/testing (068 is in unstable).

As per the file Documentation/Changes in the 2.6.13 kernel, your version of udev is too old. Please upgrade it to a newer version and this rule will work again (the problem you are seeing is caused by a bug in older versions of udev which showed up on newer kernels.)

thanks,

greg k-h

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Jim McCloskey

* Kay Sievers ([email protected]) wrote:

  |>  On Sat, Sep 03, 2005 at 05:31:50PM -0700, Jim McCloskey wrote:
  |>  > Hello. This simple rule for my Sandisk Minicruizer:
  |>  > 
  |>  > BUS="usb", SYSFS{serial}="0000183546", NAME="%k", SYMLINK="sandisk"
  |>  > 
  |>  > worked without problem under the 2.6.11 kernels, but ceased to work as
  |>  > soon as I upgraded to 2.6.13.
  |>  
  |>  ...
  |>  
  |>  >     SYSFS{scsi_level}="3"
  |>  >     SYSFS{state}="running"
  |>  >     SYSFS{timeout}="30"
  |>  >     SYSFS{type}="0"
  |>  >     SYSFS{vendor}="Generic "
  |>  > 
  |>  > where the same command run under 2.6.11 yields much much more
  |>  > information (all the `usb' bus sections).
  |>  
  |>  There shouldn't be a difference between these kernel
  |>  versions. Are you sure that this happens for the _first_ connect
  |>  after a reboot in both cases? 

Yes, it happens with the first and subsequent connects.

* Greg KH <[email protected]> wrote:

|> On Sat, Sep 03, 2005 at 05:31:50PM -0700, Jim McCloskey wrote:
|> > This is udev 056 from Debian stable/testing (068 is in unstable).
|>
|> As per the file Documentation/Changes in the 2.6.13 kernel, your version
|> of udev is too old.  

I'm really sorry to have missed this. Stupid ...

|>                     Please upgrade it to a newer version and this rule
|> will work again (the problem you are seeing is caused by a bug in older
|> versions of udev which showed up on newer kernels.)

I see. The upgrade to udev 068 did indeed fix the problem.

Thank you both very much indeed---for this help, and for all your work,

Jim

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel