public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs/udev broken in latest git?
@ 2007-07-24  6:39 Simon Arlott
  2007-07-24  7:25 ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Arlott @ 2007-07-24  6:39 UTC (permalink / raw)
  To: Linux Kernel Mailing List, cornelia.huck; +Cc: Greg Kroah-Hartman

[-- Attachment #1: Type: text/plain, Size: 4544 bytes --]

The following commit appears to break some of my udev rules (I don't 
have the time to finish the bisect right now, but there's only four 
changes showing in "git bisect visualize" - this one is tagged 
bisect/bad, and the other three are docs/docs/unrelated).

Neither of these symlinks get created by udev on kernels marked bad 
(see bisect log below):

ACTION=="add", \
        KERNEL=="event*", \
        SUBSYSTEM=="input", \
        SYSFS{description}=="i8042 KBD port", \
        NAME="input/%k", \
        SYMLINK="input/i8042-kbd", \
        MODE="0640", \
        GROUP="event"

ACTION=="add", \
        KERNEL=="event*", \
        SUBSYSTEM=="input", \
        SYSFS{manufacturer}=="Logitech", \
        SYSFS{product}=="USB-PS/2 Optical Mouse", \
        NAME="input/%k", \
        SYMLINK="input/logitech-mouse", \
        MODE="0640", \
        GROUP="event"

Author: Cornelia Huck <cornelia.huck@de.ibm.com>  2007-07-18 09:43:47
Committer: Greg Kroah-Hartman <gregkh@suse.de>  2007-07-18 23:49:50
Parent: be3884943674f8ee7656b1d8b71c087ec900c836 (HOWTO: Add the knwon_regression URI to the documentation)

    Driver core: check return code of sysfs_create_link()
    
    Check for return value of sysfs_create_link() in device_add() and
    device_rename().  Add helper functions device_add_class_symlinks() and
    device_remove_class_symlinks() to make the code easier to read.
    
    [akpm@linux-foundation.org: fix unused var warnings]
    
    Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    Acked-by: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

git-bisect start
# good: [2f493789ddc636ff19156b2752763d76ba563b39] Merge branch 'master' of git://git.kernel.org/pub/scm/linux$
git-bisect good 2f493789ddc636ff19156b2752763d76ba563b39
# bad: [a80ef3844fd9f87461578d98a992db6cc64369f8] IPv6: Don't update ADVMSS on routes where the MTU is not als$
git-bisect bad a80ef3844fd9f87461578d98a992db6cc64369f8
# bad: [febe3375ea690a6cf544c33fa0fea1a06ff451ee] [ALSA] hda-codec - Add HP Pavillion quirk to Realtek code
git-bisect bad febe3375ea690a6cf544c33fa0fea1a06ff451ee
# bad: [83c54070ee1a2d05c89793884bea1a03f2851ed4] mm: fault feedback #2
git-bisect bad 83c54070ee1a2d05c89793884bea1a03f2851ed4
# good: [a267c0a887064720dfab5775a4f09b20b4f8ec37] Merge branch 'master' of ssh://master.kernel.org/pub/scm/li$
git-bisect good a267c0a887064720dfab5775a4f09b20b4f8ec37
# good: [fc15bc817eecd5c13581adab2a182c07edededa0] Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/ui$
git-bisect good fc15bc817eecd5c13581adab2a182c07edededa0
# bad: [789c56b7f73218141b8004cb4f775eed8c514212] Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/$
git-bisect bad 789c56b7f73218141b8004cb4f775eed8c514212
# bad: [70b315b0dd3879cb3ab8aadffb14f10b2d19b9c3] [CIFS] merge conflict in fs/cifs/export.c
git-bisect bad 70b315b0dd3879cb3ab8aadffb14f10b2d19b9c3
# good: [3870253efb65e1960421ca74f5d336218c28fc5b] [CIFS] more whitespace fixes
git-bisect good 3870253efb65e1960421ca74f5d336218c28fc5b
# good: [4a379e6657ae2dd910f9f06d46bd7c05fbe9ed5c] [CIFS] Fix build break - inet.h not included when experimen$
git-bisect good 4a379e6657ae2dd910f9f06d46bd7c05fbe9ed5c
# good: [7e42ca886b0282679c2721dc4853163cc89b8a34] [CIFS] Typo in previous patch
git-bisect good 7e42ca886b0282679c2721dc4853163cc89b8a34
# good: [c18c842b1fdf527717303a4e173cbece7ab2deb8] [CIFS] Allow disabling CIFS Unix Extensions as mount option
git-bisect good c18c842b1fdf527717303a4e173cbece7ab2deb8
# good: [fc15bc817eecd5c13581adab2a182c07edededa0] Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/ui$
git-bisect good fc15bc817eecd5c13581adab2a182c07edededa0

Something went wrong here and hit a single CIFS patch, so I started from second-last bad and the good before it.

# bad: [789c56b7f73218141b8004cb4f775eed8c514212] Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/$
git-bisect bad 789c56b7f73218141b8004cb4f775eed8c514212
# bad: [2ee97caf0a6602f749ddbfdb1449e383e1212707] Driver core: check return code of sysfs_create_link()
git-bisect bad 2ee97caf0a6602f749ddbfdb1449e383e1212707
# good: [2c19c49a59ccf2162c0eb999de1ec60c0e07a533] Documentation fix devres.txt: lib/iomap.c -> lib/devres.c
git-bisect good 2c19c49a59ccf2162c0eb999de1ec60c0e07a533
# good: [aebdc3b450a3febf7d7d00cd2235509055ec7082] dev_vdbg(), available with -DVERBOSE_DEBUG
git-bisect good aebdc3b450a3febf7d7d00cd2235509055ec7082

-- 
Simon Arlott

[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 10430 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  6:39 sysfs/udev broken in latest git? Simon Arlott
@ 2007-07-24  7:25 ` Greg KH
  2007-07-24  8:03   ` Cornelia Huck
  0 siblings, 1 reply; 17+ messages in thread
From: Greg KH @ 2007-07-24  7:25 UTC (permalink / raw)
  To: Simon Arlott; +Cc: Linux Kernel Mailing List, cornelia.huck

On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
> The following commit appears to break some of my udev rules (I don't 
> have the time to finish the bisect right now, but there's only four 
> changes showing in "git bisect visualize" - this one is tagged 
> bisect/bad, and the other three are docs/docs/unrelated).
> 
> Neither of these symlinks get created by udev on kernels marked bad 
> (see bisect log below):
> 
> ACTION=="add", \
>         KERNEL=="event*", \
>         SUBSYSTEM=="input", \
>         SYSFS{description}=="i8042 KBD port", \
>         NAME="input/%k", \
>         SYMLINK="input/i8042-kbd", \
>         MODE="0640", \
>         GROUP="event"
> 
> ACTION=="add", \
>         KERNEL=="event*", \
>         SUBSYSTEM=="input", \
>         SYSFS{manufacturer}=="Logitech", \
>         SYSFS{product}=="USB-PS/2 Optical Mouse", \
>         NAME="input/%k", \
>         SYMLINK="input/logitech-mouse", \
>         MODE="0640", \
>         GROUP="event"
> 
> Author: Cornelia Huck <cornelia.huck@de.ibm.com>  2007-07-18 09:43:47
> Committer: Greg Kroah-Hartman <gregkh@suse.de>  2007-07-18 23:49:50
> Parent: be3884943674f8ee7656b1d8b71c087ec900c836 (HOWTO: Add the knwon_regression URI to the documentation)
> 
>     Driver core: check return code of sysfs_create_link()
>     
>     Check for return value of sysfs_create_link() in device_add() and
>     device_rename().  Add helper functions device_add_class_symlinks() and
>     device_remove_class_symlinks() to make the code easier to read.
>     
>     [akpm@linux-foundation.org: fix unused var warnings]
>     
>     Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>     Acked-by: Jeff Garzik <jeff@garzik.org>
>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Ugh, I thought this was all fixed up properly :(

Cornelia, can you work to figure this out?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  7:25 ` Greg KH
@ 2007-07-24  8:03   ` Cornelia Huck
  2007-07-24  8:46     ` Greg KH
  0 siblings, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2007-07-24  8:03 UTC (permalink / raw)
  To: Greg KH; +Cc: Simon Arlott, Linux Kernel Mailing List

On Tue, 24 Jul 2007 00:25:40 -0700,
Greg KH <gregkh@suse.de> wrote:

> On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
> > The following commit appears to break some of my udev rules (I don't 
> > have the time to finish the bisect right now, but there's only four 
> > changes showing in "git bisect visualize" - this one is tagged 
> > bisect/bad, and the other three are docs/docs/unrelated).
> > 
> > Neither of these symlinks get created by udev on kernels marked bad 
> > (see bisect log below):
> > 
> > ACTION=="add", \
> >         KERNEL=="event*", \
> >         SUBSYSTEM=="input", \
> >         SYSFS{description}=="i8042 KBD port", \
> >         NAME="input/%k", \
> >         SYMLINK="input/i8042-kbd", \
> >         MODE="0640", \
> >         GROUP="event"
> > 
> > ACTION=="add", \
> >         KERNEL=="event*", \
> >         SUBSYSTEM=="input", \
> >         SYSFS{manufacturer}=="Logitech", \
> >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
> >         NAME="input/%k", \
> >         SYMLINK="input/logitech-mouse", \
> >         MODE="0640", \
> >         GROUP="event"

> Ugh, I thought this was all fixed up properly :(

I thought this as well :(

But I'm a bit confused: The patch in git has

+       /* only bus-device parents get a "device"-link */
+       if (dev->parent && dev->parent->bus) {
+               error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
+                                         "device");

and

-               if (parent) {
-                       sysfs_create_link(&dev->kobj, &dev->parent->kobj,
-                                                       "device");

which really look like two different things. (My original patch didn't
have the check for the parent's bus.) Don't know what happened here :(

(Simon: Do the links reappear if you change
	if (dev->parent && dev->parent->bus)
to
	if (dev->parent)
in device_add_class_symlinks()?)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  8:03   ` Cornelia Huck
@ 2007-07-24  8:46     ` Greg KH
  2007-07-24  9:20       ` Kay Sievers
  0 siblings, 1 reply; 17+ messages in thread
From: Greg KH @ 2007-07-24  8:46 UTC (permalink / raw)
  To: Cornelia Huck, Kay Sievers; +Cc: Simon Arlott, Linux Kernel Mailing List

On Tue, Jul 24, 2007 at 10:03:14AM +0200, Cornelia Huck wrote:
> On Tue, 24 Jul 2007 00:25:40 -0700,
> Greg KH <gregkh@suse.de> wrote:
> 
> > On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
> > > The following commit appears to break some of my udev rules (I don't 
> > > have the time to finish the bisect right now, but there's only four 
> > > changes showing in "git bisect visualize" - this one is tagged 
> > > bisect/bad, and the other three are docs/docs/unrelated).
> > > 
> > > Neither of these symlinks get created by udev on kernels marked bad 
> > > (see bisect log below):
> > > 
> > > ACTION=="add", \
> > >         KERNEL=="event*", \
> > >         SUBSYSTEM=="input", \
> > >         SYSFS{description}=="i8042 KBD port", \
> > >         NAME="input/%k", \
> > >         SYMLINK="input/i8042-kbd", \
> > >         MODE="0640", \
> > >         GROUP="event"
> > > 
> > > ACTION=="add", \
> > >         KERNEL=="event*", \
> > >         SUBSYSTEM=="input", \
> > >         SYSFS{manufacturer}=="Logitech", \
> > >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
> > >         NAME="input/%k", \
> > >         SYMLINK="input/logitech-mouse", \
> > >         MODE="0640", \
> > >         GROUP="event"
> 
> > Ugh, I thought this was all fixed up properly :(
> 
> I thought this as well :(
> 
> But I'm a bit confused: The patch in git has
> 
> +       /* only bus-device parents get a "device"-link */
> +       if (dev->parent && dev->parent->bus) {
> +               error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
> +                                         "device");
> 
> and
> 
> -               if (parent) {
> -                       sysfs_create_link(&dev->kobj, &dev->parent->kobj,
> -                                                       "device");
> 
> which really look like two different things. (My original patch didn't
> have the check for the parent's bus.) Don't know what happened here :(

Ugh, this might be a merge issue with Kay's block layer device work that
was in my tree, but I had to merge by hand around this area.

> (Simon: Do the links reappear if you change
> 	if (dev->parent && dev->parent->bus)
> to
> 	if (dev->parent)
> in device_add_class_symlinks()?)

Yeah, that would be good to find out.

Kay, did I mess up the merge here?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  8:46     ` Greg KH
@ 2007-07-24  9:20       ` Kay Sievers
  2007-07-24 11:49         ` Simon Arlott
  2007-07-24 12:54         ` Cornelia Huck
  0 siblings, 2 replies; 17+ messages in thread
From: Kay Sievers @ 2007-07-24  9:20 UTC (permalink / raw)
  To: Greg KH; +Cc: Cornelia Huck, Simon Arlott, Linux Kernel Mailing List

On 7/24/07, Greg KH <gregkh@suse.de> wrote:
> On Tue, Jul 24, 2007 at 10:03:14AM +0200, Cornelia Huck wrote:
> > On Tue, 24 Jul 2007 00:25:40 -0700,
> > Greg KH <gregkh@suse.de> wrote:
> >
> > > On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
> > > > The following commit appears to break some of my udev rules (I don't
> > > > have the time to finish the bisect right now, but there's only four
> > > > changes showing in "git bisect visualize" - this one is tagged
> > > > bisect/bad, and the other three are docs/docs/unrelated).
> > > >
> > > > Neither of these symlinks get created by udev on kernels marked bad
> > > > (see bisect log below):
> > > >
> > > > ACTION=="add", \
> > > >         KERNEL=="event*", \
> > > >         SUBSYSTEM=="input", \
> > > >         SYSFS{description}=="i8042 KBD port", \
> > > >         NAME="input/%k", \
> > > >         SYMLINK="input/i8042-kbd", \
> > > >         MODE="0640", \
> > > >         GROUP="event"
> > > >
> > > > ACTION=="add", \
> > > >         KERNEL=="event*", \
> > > >         SUBSYSTEM=="input", \
> > > >         SYSFS{manufacturer}=="Logitech", \
> > > >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
> > > >         NAME="input/%k", \
> > > >         SYMLINK="input/logitech-mouse", \
> > > >         MODE="0640", \
> > > >         GROUP="event"

Simon, please run:
  udevinfo --attribute-walk --path=<devpath>
for the mouse on the working and the non-working kernel.

And make sure you have only one rule for input devices or  use
SYMLINK+="", otherwise it overwrites any earlier rule. And if you have
an earlier rule which already names the device, this one will be
ignored because it has NAME= in it.

> > > Ugh, I thought this was all fixed up properly :(
> >
> > I thought this as well :(
> >
> > But I'm a bit confused: The patch in git has
> >
> > +       /* only bus-device parents get a "device"-link */
> > +       if (dev->parent && dev->parent->bus) {
> > +               error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
> > +                                         "device");
> >
> > and
> >
> > -               if (parent) {
> > -                       sysfs_create_link(&dev->kobj, &dev->parent->kobj,
> > -                                                       "device");
> >
> > which really look like two different things. (My original patch didn't
> > have the check for the parent's bus.) Don't know what happened here :(
>
> Ugh, this might be a merge issue with Kay's block layer device work that
> was in my tree, but I had to merge by hand around this area.
>
> > (Simon: Do the links reappear if you change
> >       if (dev->parent && dev->parent->bus)
> > to
> >       if (dev->parent)
> > in device_add_class_symlinks()?)
>
> Yeah, that would be good to find out.
>
> Kay, did I mess up the merge here?

It looks fine to me. "device" links must never point to anything else
than a bus device.

Kay

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  9:20       ` Kay Sievers
@ 2007-07-24 11:49         ` Simon Arlott
  2007-07-24 11:55           ` Kay Sievers
  2007-07-24 12:54         ` Cornelia Huck
  1 sibling, 1 reply; 17+ messages in thread
From: Simon Arlott @ 2007-07-24 11:49 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Greg KH, Cornelia Huck, Linux Kernel Mailing List

On Tue, July 24, 2007 10:20, Kay Sievers wrote:
> On 7/24/07, Greg KH <gregkh@suse.de> wrote:
>> On Tue, Jul 24, 2007 at 10:03:14AM +0200, Cornelia Huck wrote:
>> > On Tue, 24 Jul 2007 00:25:40 -0700,
>> > Greg KH <gregkh@suse.de> wrote:
>> >
>> > > On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
>> > > > The following commit appears to break some of my udev rules (I don't
>> > > > have the time to finish the bisect right now, but there's only four
>> > > > changes showing in "git bisect visualize" - this one is tagged
>> > > > bisect/bad, and the other three are docs/docs/unrelated).
>> > > >
>> > > > Neither of these symlinks get created by udev on kernels marked bad
>> > > > (see bisect log below):
>> > > >
>> > > > ACTION=="add", \
>> > > >         KERNEL=="event*", \
>> > > >         SUBSYSTEM=="input", \
>> > > >         SYSFS{description}=="i8042 KBD port", \
>> > > >         NAME="input/%k", \
>> > > >         SYMLINK="input/i8042-kbd", \
>> > > >         MODE="0640", \
>> > > >         GROUP="event"
>> > > >
>> > > > ACTION=="add", \
>> > > >         KERNEL=="event*", \
>> > > >         SUBSYSTEM=="input", \
>> > > >         SYSFS{manufacturer}=="Logitech", \
>> > > >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
>> > > >         NAME="input/%k", \
>> > > >         SYMLINK="input/logitech-mouse", \
>> > > >         MODE="0640", \
>> > > >         GROUP="event"
>
> Simon, please run:
>   udevinfo --attribute-walk --path=<devpath>
> for the mouse on the working and the non-working kernel.

On the working kernel:

  looking at device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2/2-2:1.0':
    KERNEL=="2-2:1.0"
    SUBSYSTEM=="usb"
    DRIVER=="usbhid"
    ATTR{modalias}=="usb:v046DpC044d2710dc00dsc00dp00ic03isc01ip02"
    ATTR{bInterfaceProtocol}=="02"
    ATTR{bInterfaceSubClass}=="01"
    ATTR{bInterfaceClass}=="03"
    ATTR{bNumEndpoints}=="01"
    ATTR{bAlternateSetting}==" 0"
    ATTR{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2':
    KERNELS=="2-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="USB-PS/2 Optical Mouse"
    ATTRS{manufacturer}=="Logitech"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="3"
    ATTRS{busnum}=="2"
    ATTRS{speed}=="1.5"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bcdDevice}=="2710"
    ATTRS{idProduct}=="c044"
    ATTRS{idVendor}=="046d"
    ATTRS{bMaxPower}==" 98mA"
    ATTRS{bmAttributes}=="a0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:130"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0/usb2':
    KERNELS=="usb2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:0c.0"
    ATTRS{product}=="UHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.22-git uhci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="2"
    ATTRS{version}==" 1.10"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="2"
    ATTRS{speed}=="12"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:128"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0':
    KERNELS=="0000:00:0c.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="uhci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{modalias}=="pci:v00001106d00003038sv00001106sd00003038bc0Csc03i00"
    ATTRS{local_cpus}=="1"
    ATTRS{irq}=="11"
    ATTRS{class}=="0x0c0300"
    ATTRS{subsystem_device}=="0x3038"
    ATTRS{subsystem_vendor}=="0x1106"
    ATTRS{device}=="0x3038"
    ATTRS{vendor}=="0x1106"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

I can't run it on the non-working kernel until this evening...

> And make sure you have only one rule for input devices or  use
> SYMLINK+="", otherwise it overwrites any earlier rule. And if you have
> an earlier rule which already names the device, this one will be
> ignored because it has NAME= in it.

These rules are before the other event* rules.

>> > > Ugh, I thought this was all fixed up properly :(
>> >
>> > I thought this as well :(
>> >
>> > But I'm a bit confused: The patch in git has
>> >
>> > +       /* only bus-device parents get a "device"-link */
>> > +       if (dev->parent && dev->parent->bus) {
>> > +               error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
>> > +                                         "device");
>> >
>> > and
>> >
>> > -               if (parent) {
>> > -                       sysfs_create_link(&dev->kobj, &dev->parent->kobj,
>> > -                                                       "device");
>> >
>> > which really look like two different things. (My original patch didn't
>> > have the check for the parent's bus.) Don't know what happened here :(
>>
>> Ugh, this might be a merge issue with Kay's block layer device work that
>> was in my tree, but I had to merge by hand around this area.
>>
>> > (Simon: Do the links reappear if you change
>> >       if (dev->parent && dev->parent->bus)
>> > to
>> >       if (dev->parent)
>> > in device_add_class_symlinks()?)
>>
>> Yeah, that would be good to find out.
>>
>> Kay, did I mess up the merge here?
>
> It looks fine to me. "device" links must never point to anything else
> than a bus device.


-- 
Simon Arlott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24 11:49         ` Simon Arlott
@ 2007-07-24 11:55           ` Kay Sievers
  2007-07-24 12:00             ` Simon Arlott
  0 siblings, 1 reply; 17+ messages in thread
From: Kay Sievers @ 2007-07-24 11:55 UTC (permalink / raw)
  To: Simon Arlott; +Cc: Greg KH, Cornelia Huck, Linux Kernel Mailing List

On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
> On Tue, July 24, 2007 10:20, Kay Sievers wrote:
> > On 7/24/07, Greg KH <gregkh@suse.de> wrote:
> >> On Tue, Jul 24, 2007 at 10:03:14AM +0200, Cornelia Huck wrote:
> >> > On Tue, 24 Jul 2007 00:25:40 -0700,
> >> > Greg KH <gregkh@suse.de> wrote:
> >> >
> >> > > On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
> >> > > > The following commit appears to break some of my udev rules (I don't
> >> > > > have the time to finish the bisect right now, but there's only four
> >> > > > changes showing in "git bisect visualize" - this one is tagged
> >> > > > bisect/bad, and the other three are docs/docs/unrelated).
> >> > > >
> >> > > > Neither of these symlinks get created by udev on kernels marked bad
> >> > > > (see bisect log below):
> >> > > >
> >> > > > ACTION=="add", \
> >> > > >         KERNEL=="event*", \
> >> > > >         SUBSYSTEM=="input", \
> >> > > >         SYSFS{description}=="i8042 KBD port", \
> >> > > >         NAME="input/%k", \
> >> > > >         SYMLINK="input/i8042-kbd", \
> >> > > >         MODE="0640", \
> >> > > >         GROUP="event"
> >> > > >
> >> > > > ACTION=="add", \
> >> > > >         KERNEL=="event*", \
> >> > > >         SUBSYSTEM=="input", \
> >> > > >         SYSFS{manufacturer}=="Logitech", \
> >> > > >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
> >> > > >         NAME="input/%k", \
> >> > > >         SYMLINK="input/logitech-mouse", \
> >> > > >         MODE="0640", \
> >> > > >         GROUP="event"
> >
> > Simon, please run:
> >   udevinfo --attribute-walk --path=<devpath>
> > for the mouse on the working and the non-working kernel.
>
> On the working kernel:
>
>   looking at device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2/2-2:1.0':

Please start with the event* device your rule catches, not the usb one.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24 11:55           ` Kay Sievers
@ 2007-07-24 12:00             ` Simon Arlott
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Arlott @ 2007-07-24 12:00 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Greg KH, Cornelia Huck, Linux Kernel Mailing List


On Tue, July 24, 2007 12:55, Kay Sievers wrote:
> On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
>> On Tue, July 24, 2007 10:20, Kay Sievers wrote:
>> > On 7/24/07, Greg KH <gregkh@suse.de> wrote:
>> >> On Tue, Jul 24, 2007 at 10:03:14AM +0200, Cornelia Huck wrote:
>> >> > On Tue, 24 Jul 2007 00:25:40 -0700,
>> >> > Greg KH <gregkh@suse.de> wrote:
>> >> >
>> >> > > On Tue, Jul 24, 2007 at 07:39:38AM +0100, Simon Arlott wrote:
>> >> > > > The following commit appears to break some of my udev rules (I don't
>> >> > > > have the time to finish the bisect right now, but there's only four
>> >> > > > changes showing in "git bisect visualize" - this one is tagged
>> >> > > > bisect/bad, and the other three are docs/docs/unrelated).
>> >> > > >
>> >> > > > Neither of these symlinks get created by udev on kernels marked bad
>> >> > > > (see bisect log below):
>> >> > > >
>> >> > > > ACTION=="add", \
>> >> > > >         KERNEL=="event*", \
>> >> > > >         SUBSYSTEM=="input", \
>> >> > > >         SYSFS{description}=="i8042 KBD port", \
>> >> > > >         NAME="input/%k", \
>> >> > > >         SYMLINK="input/i8042-kbd", \
>> >> > > >         MODE="0640", \
>> >> > > >         GROUP="event"
>> >> > > >
>> >> > > > ACTION=="add", \
>> >> > > >         KERNEL=="event*", \
>> >> > > >         SUBSYSTEM=="input", \
>> >> > > >         SYSFS{manufacturer}=="Logitech", \
>> >> > > >         SYSFS{product}=="USB-PS/2 Optical Mouse", \
>> >> > > >         NAME="input/%k", \
>> >> > > >         SYMLINK="input/logitech-mouse", \
>> >> > > >         MODE="0640", \
>> >> > > >         GROUP="event"
>> >
>> > Simon, please run:
>> >   udevinfo --attribute-walk --path=<devpath>
>> > for the mouse on the working and the non-working kernel.
>>
>> On the working kernel:
>>
>>   looking at device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2/2-2:1.0':
>
> Please start with the event* device your rule catches, not the usb one.
>

  looking at device '/class/input/event4':
    KERNEL=="event4"
    SUBSYSTEM=="input"
    DRIVER==""
    ATTR{dev}=="13:68"

  looking at device '/class/input/input4':
    KERNEL=="input4"
    SUBSYSTEM=="input"
    DRIVER==""
    ATTR{modalias}=="input:b0003v046DpC044e0110-e0,1,2,k110,111,112,113,114,115,116,117,r0,1,6,8,amlsfw"
    ATTR{uniq}==""
    ATTR{phys}=="usb-0000:00:0c.0-2/input0"
    ATTR{name}=="Logitech USB-PS/2 Optical Mouse"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2/2-2:1.0':
    KERNELS=="2-2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{modalias}=="usb:v046DpC044d2710dc00dsc00dp00ic03isc01ip02"
    ATTRS{bInterfaceProtocol}=="02"
    ATTRS{bInterfaceSubClass}=="01"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0/usb2/2-2':
    KERNELS=="2-2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{product}=="USB-PS/2 Optical Mouse"
    ATTRS{manufacturer}=="Logitech"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="0"
    ATTRS{version}==" 2.00"
    ATTRS{devnum}=="3"
    ATTRS{busnum}=="2"
    ATTRS{speed}=="1.5"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bcdDevice}=="2710"
    ATTRS{idProduct}=="c044"
    ATTRS{idVendor}=="046d"
    ATTRS{bMaxPower}==" 98mA"
    ATTRS{bmAttributes}=="a0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:130"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0/usb2':
    KERNELS=="usb2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{serial}=="0000:00:0c.0"
    ATTRS{product}=="UHCI Host Controller"
    ATTRS{manufacturer}=="Linux 2.6.22-git uhci_hcd"
    ATTRS{quirks}=="0x0"
    ATTRS{maxchild}=="2"
    ATTRS{version}==" 1.10"
    ATTRS{devnum}=="1"
    ATTRS{busnum}=="2"
    ATTRS{speed}=="12"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0206"
    ATTRS{idProduct}=="0000"
    ATTRS{idVendor}=="0000"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{configuration}==""
    ATTRS{dev}=="189:128"

  looking at parent device '/devices/pci0000:00/0000:00:0c.0':
    KERNELS=="0000:00:0c.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="uhci_hcd"
    ATTRS{msi_bus}==""
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{modalias}=="pci:v00001106d00003038sv00001106sd00003038bc0Csc03i00"
    ATTRS{local_cpus}=="1"
    ATTRS{irq}=="11"
    ATTRS{class}=="0x0c0300"
    ATTRS{subsystem_device}=="0x3038"
    ATTRS{subsystem_vendor}=="0x1106"
    ATTRS{device}=="0x3038"
    ATTRS{vendor}=="0x1106"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""


I'm sure this only output the first two sections for the non-working kernel, but the "device" symlink
existed in /class/input/input3/:

  looking at device '/class/input/event3':
    KERNEL=="event3"
    SUBSYSTEM=="input"
    DRIVER==""
    ATTR{dev}=="13:67"

  looking at device '/class/input/input3':
    KERNEL=="input3"
    SUBSYSTEM=="input"
    DRIVER==""
    ATTR{uniq}==""
    ATTR{phys}=="isa0060/serio0/input0"
    ATTR{name}=="AT Translated Set 2 keyboard"

  looking at parent device '/devices/platform/i8042/serio0':
    KERNELS=="serio0"
    SUBSYSTEMS=="serio"
    DRIVERS=="atkbd"
    ATTRS{err_count}=="0"
    ATTRS{softraw}=="1"
    ATTRS{softrepeat}=="0"
    ATTRS{set}=="2"
    ATTRS{scroll}=="0"
    ATTRS{extra}=="0"
    ATTRS{bind_mode}=="auto"
    ATTRS{modalias}=="serio:ty06pr00id00ex00"
    ATTRS{description}=="i8042 KBD port"

  looking at parent device '/devices/platform/i8042':
    KERNELS=="i8042"
    SUBSYSTEMS=="platform"
    DRIVERS=="i8042"
    ATTRS{modalias}=="i8042"
    ATTRS{uevent}==""

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""


-- 
Simon Arlott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in latest git?
  2007-07-24  9:20       ` Kay Sievers
  2007-07-24 11:49         ` Simon Arlott
@ 2007-07-24 12:54         ` Cornelia Huck
  2007-07-24 16:28           ` sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?) Simon Arlott
  1 sibling, 1 reply; 17+ messages in thread
From: Cornelia Huck @ 2007-07-24 12:54 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Greg KH, Simon Arlott, Linux Kernel Mailing List

On Tue, 24 Jul 2007 11:20:02 +0200,
"Kay Sievers" <kay.sievers@vrfy.org> wrote:

> It looks fine to me. "device" links must never point to anything else
> than a bus device.

Hm, but then
1. The patch sneaks this check in (the old code only checked for
   dev->parent)
2. The code is rather inconsistent now, since none of the other code
   paths check for dev->parent->bus...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-24 12:54         ` Cornelia Huck
@ 2007-07-24 16:28           ` Simon Arlott
  2007-07-24 16:34             ` Kay Sievers
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Arlott @ 2007-07-24 16:28 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: Kay Sievers, Greg KH, Linux Kernel Mailing List

On 24/07/07 13:54, Cornelia Huck wrote:
> On Tue, 24 Jul 2007 11:20:02 +0200,
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> 
>> It looks fine to me. "device" links must never point to anything else
>> than a bus device.
> 
> Hm, but then
> 1. The patch sneaks this check in (the old code only checked for
>    dev->parent)
> 2. The code is rather inconsistent now, since none of the other code
>    paths check for dev->parent->bus...

Removing the dev->parent->bus check fixes it:

[   40.043981] serio: i8042 KBD port at 0x60,0x64 irq 1
[   40.044653] mice: PS/2 mouse device common for all mice
[   40.044792] dev->parent && !dev->parent->bus:
[   40.044794]  dev->kobj->k_name=event0
[   40.044796]  dev->kobj->name=event0
[   40.044798]  dev->parent->kobj->k_name=input0
[   40.044800]  dev->parent->kobj->name=input0

[   40.044948] dev->parent && !dev->parent->bus:
[   40.044951]  dev->kobj->k_name=event1
[   40.044952]  dev->kobj->name=event1
[   40.044954]  dev->parent->kobj->k_name=input1
[   40.044956]  dev->parent->kobj->name=input1

[   40.045075] dev->parent && !dev->parent->bus:
[   40.045077]  dev->kobj->k_name=event2
[   40.045079]  dev->kobj->name=event2
[   40.045080]  dev->parent->kobj->k_name=input2
[   40.045082]  dev->parent->kobj->name=input2

[   40.067204] input: AT Translated Set 2 keyboard as /class/input/input3
[   40.067368] dev->parent && !dev->parent->bus:
[   40.067370]  dev->kobj->k_name=event3
[   40.067372]  dev->kobj->name=event3
[   40.067373]  dev->parent->kobj->k_name=input3
[   40.067375]  dev->parent->kobj->name=input3

[   40.067713] i2c /dev entries driver
[   40.068190] dev->parent && !dev->parent->bus:
[   40.068193]  dev->kobj->k_name=i2c-0
[   40.068195]  dev->kobj->name=i2c-0
[   40.068196]  dev->parent->kobj->k_name=i2c-0
[   40.068198]  dev->parent->kobj->name=i2c-0

[   40.068386] dev->parent && !dev->parent->bus:
[   40.068389]  dev->kobj->k_name=i2c-9191
[   40.068391]  dev->kobj->name=i2c-9191
[   40.068392]  dev->parent->kobj->k_name=platform
[   40.068394]  dev->parent->kobj->name=platform

[   40.068892] dev->parent && !dev->parent->bus:
[   40.068895]  dev->kobj->k_name=i2c-1
[   40.068896]  dev->kobj->name=i2c-1
[   40.068898]  dev->parent->kobj->k_name=i2c-1
[   40.068899]  dev->parent->kobj->name=i2c-1

[   40.085201] input: Logitech USB-PS/2 Optical Mouse as /class/input/input4
[   40.085362] dev->parent && !dev->parent->bus:
[   40.085365]  dev->kobj->k_name=mouse0
[   40.085367]  dev->kobj->name=mouse0
[   40.085368]  dev->parent->kobj->k_name=input4
[   40.085370]  dev->parent->kobj->name=input4

[   40.085528] dev->parent && !dev->parent->bus:
[   40.085530]  dev->kobj->k_name=event4
[   40.085532]  dev->kobj->name=event4
[   40.085534]  dev->parent->kobj->k_name=input4
[   40.085535]  dev->parent->kobj->name=input4

-- 
Simon Arlott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-24 16:28           ` sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?) Simon Arlott
@ 2007-07-24 16:34             ` Kay Sievers
  2007-07-24 16:57               ` Simon Arlott
  0 siblings, 1 reply; 17+ messages in thread
From: Kay Sievers @ 2007-07-24 16:34 UTC (permalink / raw)
  To: Simon Arlott; +Cc: Cornelia Huck, Greg KH, Linux Kernel Mailing List

On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
> On 24/07/07 13:54, Cornelia Huck wrote:
> > On Tue, 24 Jul 2007 11:20:02 +0200,
> > "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> >
> >> It looks fine to me. "device" links must never point to anything else
> >> than a bus device.
> >
> > Hm, but then
> > 1. The patch sneaks this check in (the old code only checked for
> >    dev->parent)
> > 2. The code is rather inconsistent now, since none of the other code
> >    paths check for dev->parent->bus...
>
> Removing the dev->parent->bus check fixes it:
>
> [   40.043981] serio: i8042 KBD port at 0x60,0x64 irq 1
> [   40.044653] mice: PS/2 mouse device common for all mice
> [   40.044792] dev->parent && !dev->parent->bus:
> [   40.044794]  dev->kobj->k_name=event0
> [   40.044796]  dev->kobj->name=event0
> [   40.044798]  dev->parent->kobj->k_name=input0
> [   40.044800]  dev->parent->kobj->name=input0
>
> [   40.044948] dev->parent && !dev->parent->bus:
> [   40.044951]  dev->kobj->k_name=event1
> [   40.044952]  dev->kobj->name=event1
> [   40.044954]  dev->parent->kobj->k_name=input1
> [   40.044956]  dev->parent->kobj->name=input1
>
> [   40.045075] dev->parent && !dev->parent->bus:
> [   40.045077]  dev->kobj->k_name=event2
> [   40.045079]  dev->kobj->name=event2
> [   40.045080]  dev->parent->kobj->k_name=input2
> [   40.045082]  dev->parent->kobj->name=input2
>
> [   40.067204] input: AT Translated Set 2 keyboard as /class/input/input3
> [   40.067368] dev->parent && !dev->parent->bus:
> [   40.067370]  dev->kobj->k_name=event3
> [   40.067372]  dev->kobj->name=event3
> [   40.067373]  dev->parent->kobj->k_name=input3
> [   40.067375]  dev->parent->kobj->name=input3
>
> [   40.067713] i2c /dev entries driver
> [   40.068190] dev->parent && !dev->parent->bus:
> [   40.068193]  dev->kobj->k_name=i2c-0
> [   40.068195]  dev->kobj->name=i2c-0
> [   40.068196]  dev->parent->kobj->k_name=i2c-0
> [   40.068198]  dev->parent->kobj->name=i2c-0
>
> [   40.068386] dev->parent && !dev->parent->bus:
> [   40.068389]  dev->kobj->k_name=i2c-9191
> [   40.068391]  dev->kobj->name=i2c-9191
> [   40.068392]  dev->parent->kobj->k_name=platform
> [   40.068394]  dev->parent->kobj->name=platform
>
> [   40.068892] dev->parent && !dev->parent->bus:
> [   40.068895]  dev->kobj->k_name=i2c-1
> [   40.068896]  dev->kobj->name=i2c-1
> [   40.068898]  dev->parent->kobj->k_name=i2c-1
> [   40.068899]  dev->parent->kobj->name=i2c-1
>
> [   40.085201] input: Logitech USB-PS/2 Optical Mouse as /class/input/input4
> [   40.085362] dev->parent && !dev->parent->bus:
> [   40.085365]  dev->kobj->k_name=mouse0
> [   40.085367]  dev->kobj->name=mouse0
> [   40.085368]  dev->parent->kobj->k_name=input4
> [   40.085370]  dev->parent->kobj->name=input4
>
> [   40.085528] dev->parent && !dev->parent->bus:
> [   40.085530]  dev->kobj->k_name=event4
> [   40.085532]  dev->kobj->name=event4
> [   40.085534]  dev->parent->kobj->k_name=input4
> [   40.085535]  dev->parent->kobj->name=input4

Strange.

What's the setting of CONFIG_SYSFS_DEPRECATED? Maybe there is
something that needs to be fixed in the block patch where the code
snippet is coming from.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-24 16:34             ` Kay Sievers
@ 2007-07-24 16:57               ` Simon Arlott
  2007-07-25  0:19                 ` Kay Sievers
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Arlott @ 2007-07-24 16:57 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Cornelia Huck, Greg KH, Linux Kernel Mailing List

On 24/07/07 17:34, Kay Sievers wrote:
> On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
>> On 24/07/07 13:54, Cornelia Huck wrote:
>> > On Tue, 24 Jul 2007 11:20:02 +0200,
>> > "Kay Sievers" <kay.sievers@vrfy.org> wrote:
>> >
>> >> It looks fine to me. "device" links must never point to anything else
>> >> than a bus device.
>> >
>> > Hm, but then
>> > 1. The patch sneaks this check in (the old code only checked for
>> >    dev->parent)
>> > 2. The code is rather inconsistent now, since none of the other code
>> >    paths check for dev->parent->bus...
>>
>> Removing the dev->parent->bus check fixes it:
>>
>> [   40.043981] serio: i8042 KBD port at 0x60,0x64 irq 1
>> [   40.044653] mice: PS/2 mouse device common for all mice
>> [   40.044792] dev->parent && !dev->parent->bus:
>> [   40.044794]  dev->kobj->k_name=event0
>> [   40.044796]  dev->kobj->name=event0
>> [   40.044798]  dev->parent->kobj->k_name=input0
>> [   40.044800]  dev->parent->kobj->name=input0
>>
>> [   40.044948] dev->parent && !dev->parent->bus:
>> [   40.044951]  dev->kobj->k_name=event1
>> [   40.044952]  dev->kobj->name=event1
>> [   40.044954]  dev->parent->kobj->k_name=input1
>> [   40.044956]  dev->parent->kobj->name=input1
>>
>> [   40.045075] dev->parent && !dev->parent->bus:
>> [   40.045077]  dev->kobj->k_name=event2
>> [   40.045079]  dev->kobj->name=event2
>> [   40.045080]  dev->parent->kobj->k_name=input2
>> [   40.045082]  dev->parent->kobj->name=input2
>>
>> [   40.067204] input: AT Translated Set 2 keyboard as /class/input/input3
>> [   40.067368] dev->parent && !dev->parent->bus:
>> [   40.067370]  dev->kobj->k_name=event3
>> [   40.067372]  dev->kobj->name=event3
>> [   40.067373]  dev->parent->kobj->k_name=input3
>> [   40.067375]  dev->parent->kobj->name=input3
>>
>> [   40.067713] i2c /dev entries driver
>> [   40.068190] dev->parent && !dev->parent->bus:
>> [   40.068193]  dev->kobj->k_name=i2c-0
>> [   40.068195]  dev->kobj->name=i2c-0
>> [   40.068196]  dev->parent->kobj->k_name=i2c-0
>> [   40.068198]  dev->parent->kobj->name=i2c-0
>>
>> [   40.068386] dev->parent && !dev->parent->bus:
>> [   40.068389]  dev->kobj->k_name=i2c-9191
>> [   40.068391]  dev->kobj->name=i2c-9191
>> [   40.068392]  dev->parent->kobj->k_name=platform
>> [   40.068394]  dev->parent->kobj->name=platform
>>
>> [   40.068892] dev->parent && !dev->parent->bus:
>> [   40.068895]  dev->kobj->k_name=i2c-1
>> [   40.068896]  dev->kobj->name=i2c-1
>> [   40.068898]  dev->parent->kobj->k_name=i2c-1
>> [   40.068899]  dev->parent->kobj->name=i2c-1
>>
>> [   40.085201] input: Logitech USB-PS/2 Optical Mouse as
>> /class/input/input4
>> [   40.085362] dev->parent && !dev->parent->bus:
>> [   40.085365]  dev->kobj->k_name=mouse0
>> [   40.085367]  dev->kobj->name=mouse0
>> [   40.085368]  dev->parent->kobj->k_name=input4
>> [   40.085370]  dev->parent->kobj->name=input4
>>
>> [   40.085528] dev->parent && !dev->parent->bus:
>> [   40.085530]  dev->kobj->k_name=event4
>> [   40.085532]  dev->kobj->name=event4
>> [   40.085534]  dev->parent->kobj->k_name=input4
>> [   40.085535]  dev->parent->kobj->name=input4
> 
> Strange.
> 
> What's the setting of CONFIG_SYSFS_DEPRECATED? Maybe there is
> something that needs to be fixed in the block patch where the code
> snippet is coming from.

It was =y, I changed it to =n and... it becomes worse:

[   40.697936] dev->parent && !dev->parent->bus:
[   40.697940]  dev->kobj->k_name=midiC1D0
[   40.697943]  dev->kobj->name=midiC1D0
[   40.697944]  dev->parent->kobj->k_name=card1
[   40.697946]  dev->parent->kobj->name=card1

[   40.698192] dev->parent && !dev->parent->bus:
[   40.698194]  dev->kobj->k_name=midi1
[   40.698196]  dev->kobj->name=midi1
[   40.698197]  dev->parent->kobj->k_name=card1
[   40.698199]  dev->parent->kobj->name=card1

[   40.698466] dev->parent && !dev->parent->bus:
[   40.698468]  dev->kobj->k_name=dmmidi1
[   40.698470]  dev->kobj->name=dmmidi1
[   40.698472]  dev->parent->kobj->k_name=card1
[   40.698473]  dev->parent->kobj->name=card1

[   40.698849] dev->parent && !dev->parent->bus:
[   40.698853]  dev->kobj->k_name=controlC1
[   40.698855]  dev->kobj->name=controlC1
[   40.698856]  dev->parent->kobj->k_name=card1
[   40.698858]  dev->parent->kobj->name=card1

[   40.699128] dev->parent && !dev->parent->bus:
[   40.699130]  dev->kobj->k_name=mixer1
[   40.699132]  dev->kobj->name=mixer1
[   40.699134]  dev->parent->kobj->k_name=card1
[   40.699135]  dev->parent->kobj->name=card1

[   41.210301] dev->parent && !dev->parent->bus:
[   41.210305]  dev->kobj->k_name=pcmC0D0p
[   41.210307]  dev->kobj->name=pcmC0D0p
[   41.210309]  dev->parent->kobj->k_name=card0
[   41.210311]  dev->parent->kobj->name=card0

[   41.210553] dev->parent && !dev->parent->bus:
[   41.210556]  dev->kobj->k_name=pcmC0D0c
[   41.210557]  dev->kobj->name=pcmC0D0c
[   41.210559]  dev->parent->kobj->k_name=card0
[   41.210561]  dev->parent->kobj->name=card0

[   41.210761] dev->parent && !dev->parent->bus:
[   41.210764]  dev->kobj->k_name=dsp
[   41.210765]  dev->kobj->name=dsp
[   41.210767]  dev->parent->kobj->k_name=card0
[   41.210768]  dev->parent->kobj->name=card0

[   41.210952] dev->parent && !dev->parent->bus:
[   41.210954]  dev->kobj->k_name=audio
[   41.210956]  dev->kobj->name=audio
[   41.210958]  dev->parent->kobj->k_name=card0
[   41.210959]  dev->parent->kobj->name=card0

[   41.211318] dev->parent && !dev->parent->bus:
[   41.211321]  dev->kobj->k_name=controlC0
[   41.211323]  dev->kobj->name=controlC0
[   41.211325]  dev->parent->kobj->k_name=card0
[   41.211327]  dev->parent->kobj->name=card0

[   41.211499] dev->parent && !dev->parent->bus:
[   41.211501]  dev->kobj->k_name=mixer
[   41.211503]  dev->kobj->name=mixer
[   41.211504]  dev->parent->kobj->k_name=card0
[   41.211506]  dev->parent->kobj->name=card0

[   41.239531] dev->parent && !dev->parent->bus:
[   41.239534]  dev->kobj->k_name=pcmC2D0c
[   41.239536]  dev->kobj->name=pcmC2D0c
[   41.239538]  dev->parent->kobj->k_name=card2
[   41.239539]  dev->parent->kobj->name=card2

[   41.239706] dev->parent && !dev->parent->bus:
[   41.239709]  dev->kobj->k_name=dsp2
[   41.239710]  dev->kobj->name=dsp2
[   41.239712]  dev->parent->kobj->k_name=card2
[   41.239714]  dev->parent->kobj->name=card2

[   41.239843] dev->parent && !dev->parent->bus:
[   41.239845]  dev->kobj->k_name=audio2
[   41.239847]  dev->kobj->name=audio2
[   41.239849]  dev->parent->kobj->k_name=card2
[   41.239850]  dev->parent->kobj->name=card2

[   41.240013] dev->parent && !dev->parent->bus:
[   41.240015]  dev->kobj->k_name=controlC2
[   41.240017]  dev->kobj->name=controlC2
[   41.240018]  dev->parent->kobj->k_name=card2
[   41.240020]  dev->parent->kobj->name=card2

[   41.240230] dev->parent && !dev->parent->bus:
[   41.240233]  dev->kobj->k_name=mixer2
[   41.240234]  dev->kobj->name=mixer2
[   41.240236]  dev->parent->kobj->k_name=card2
[   41.240238]  dev->parent->kobj->name=card2

Those definitely didn't trigger the same condition before, 
so that's weird too.

-- 
Simon Arlott

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-24 16:57               ` Simon Arlott
@ 2007-07-25  0:19                 ` Kay Sievers
  2007-07-25  7:58                   ` Cornelia Huck
  0 siblings, 1 reply; 17+ messages in thread
From: Kay Sievers @ 2007-07-25  0:19 UTC (permalink / raw)
  To: Simon Arlott; +Cc: Cornelia Huck, Greg KH, Linux Kernel Mailing List

On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
> On 24/07/07 17:34, Kay Sievers wrote:
> > On 7/24/07, Simon Arlott <simon@fire.lp0.eu> wrote:
> >> On 24/07/07 13:54, Cornelia Huck wrote:
> >> > On Tue, 24 Jul 2007 11:20:02 +0200,
> >> > "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> >> >
> >> >> It looks fine to me. "device" links must never point to anything else
> >> >> than a bus device.

While it's still true, for input we have special rules because the
"stacked class devices" existed only there. At least for
SYSFS_DEPRECATED, all input devices should have a "device" symlink
pointing to the bus-device.

> >> > Hm, but then
> >> > 1. The patch sneaks this check in (the old code only checked for
> >> >    dev->parent)
> >> > 2. The code is rather inconsistent now, since none of the other code
> >> >    paths check for dev->parent->bus...

Yeah, that's true.

> >> Removing the dev->parent->bus check fixes it:

Yes, let's remove the check, I will check now if we possibly need to
fix more than this or only the block-device patch.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-25  0:19                 ` Kay Sievers
@ 2007-07-25  7:58                   ` Cornelia Huck
  2007-07-26  0:11                     ` Greg KH
  2007-07-30 19:12                     ` patch driver-core-revert-device-link-creation-check.patch added to gregkh-2.6 tree gregkh
  0 siblings, 2 replies; 17+ messages in thread
From: Cornelia Huck @ 2007-07-25  7:58 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Simon Arlott, Greg KH, Linux Kernel Mailing List

On Wed, 25 Jul 2007 02:19:18 +0200,
"Kay Sievers" <kay.sievers@vrfy.org> wrote:

> > >> Removing the dev->parent->bus check fixes it:
> 
> Yes, let's remove the check, I will check now if we possibly need to
> fix more than this or only the block-device patch.

It seems this is the only place we check for dev->parent->bus in the
current git tree.

Patch below.


driver core: revert "device" link creation check

Commit 2ee97caf0a6602f749ddbfdb1449e383e1212707 introduced an extra
check on when to create the "device" symlink. Unfortunately, this
breaks input, so let's revert to the old behaviour.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

---
 drivers/base/core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.orig/drivers/base/core.c
+++ linux-2.6/drivers/base/core.c
@@ -680,8 +680,7 @@ static int device_add_class_symlinks(str
 		if (error)
 			goto out_subsys;
 	}
-	/* only bus-device parents get a "device"-link */
-	if (dev->parent && dev->parent->bus) {
+	if (dev->parent) {
 		error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
 					  "device");
 		if (error)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-25  7:58                   ` Cornelia Huck
@ 2007-07-26  0:11                     ` Greg KH
  2007-07-26  0:17                       ` Kay Sievers
  2007-07-30 19:12                     ` patch driver-core-revert-device-link-creation-check.patch added to gregkh-2.6 tree gregkh
  1 sibling, 1 reply; 17+ messages in thread
From: Greg KH @ 2007-07-26  0:11 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: Kay Sievers, Simon Arlott, Linux Kernel Mailing List

On Wed, Jul 25, 2007 at 09:58:08AM +0200, Cornelia Huck wrote:
> On Wed, 25 Jul 2007 02:19:18 +0200,
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> 
> > > >> Removing the dev->parent->bus check fixes it:
> > 
> > Yes, let's remove the check, I will check now if we possibly need to
> > fix more than this or only the block-device patch.
> 
> It seems this is the only place we check for dev->parent->bus in the
> current git tree.
> 
> Patch below.

Thanks for figuring this out, I'll add this to my tree.

So what is the input layer doing so differently from everyone else here?
Is it correct?  (sorry, am at a conference this week, so can't dig into
it as much as I would like to until Friday...)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?)
  2007-07-26  0:11                     ` Greg KH
@ 2007-07-26  0:17                       ` Kay Sievers
  0 siblings, 0 replies; 17+ messages in thread
From: Kay Sievers @ 2007-07-26  0:17 UTC (permalink / raw)
  To: Greg KH; +Cc: Cornelia Huck, Simon Arlott, Linux Kernel Mailing List


On Wed, 2007-07-25 at 17:11 -0700, Greg KH wrote:
> On Wed, Jul 25, 2007 at 09:58:08AM +0200, Cornelia Huck wrote:
> > On Wed, 25 Jul 2007 02:19:18 +0200,
> > "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> > 
> > > > >> Removing the dev->parent->bus check fixes it:
> > > 
> > > Yes, let's remove the check, I will check now if we possibly need to
> > > fix more than this or only the block-device patch.
> > 
> > It seems this is the only place we check for dev->parent->bus in the
> > current git tree.
> > 
> > Patch below.
> 
> Thanks for figuring this out, I'll add this to my tree.
> 
> So what is the input layer doing so differently from everyone else here?
> Is it correct?  (sorry, am at a conference this week, so can't dig into
> it as much as I would like to until Friday...)

It was the only place where we stacked (had a hierarchy of) class
devices. We got a class device being a child of another class device.

We never did anything like that and it was the reason to go for a
unified tree at /sys/devices/ instead of putting small hierarchy trees
all over the place, which can never be changed later, as they are the
defined entry points into the device tree.

Kay


^ permalink raw reply	[flat|nested] 17+ messages in thread

* patch driver-core-revert-device-link-creation-check.patch added to gregkh-2.6 tree
  2007-07-25  7:58                   ` Cornelia Huck
  2007-07-26  0:11                     ` Greg KH
@ 2007-07-30 19:12                     ` gregkh
  1 sibling, 0 replies; 17+ messages in thread
From: gregkh @ 2007-07-30 19:12 UTC (permalink / raw)
  To: cornelia.huck, gregkh, kay.sievers, linux-kernel, simon


This is a note to let you know that I've just added the patch titled

     Subject: driver core: revert "device" link creation check

to my gregkh-2.6 tree.  Its filename is

     driver-core-revert-device-link-creation-check.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From cornelia.huck@de.ibm.com Wed Jul 25 00:58:00 2007
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Date: Wed, 25 Jul 2007 09:58:08 +0200
Subject: driver core: revert "device" link creation check
To: "Kay Sievers" <kay.sievers@vrfy.org>
Cc: "Simon Arlott" <simon@fire.lp0.eu>, "Greg KH" <gregkh@suse.de>, "Linux  Kernel Mailing List" <linux-kernel@vger.kernel.org>
Message-ID: <20070725095808.09b2cc2a@gondolin.boeblingen.de.ibm.com>

From: Cornelia Huck <cornelia.huck@de.ibm.com>

driver core: revert "device" link creation check

Commit 2ee97caf0a6602f749ddbfdb1449e383e1212707 introduced an extra
check on when to create the "device" symlink. Unfortunately, this
breaks input, so let's revert to the old behaviour.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/base/core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -692,8 +692,7 @@ static int device_add_class_symlinks(str
 		if (error)
 			goto out_subsys;
 	}
-	/* only bus-device parents get a "device"-link */
-	if (dev->parent && dev->parent->bus) {
+	if (dev->parent) {
 		error = sysfs_create_link(&dev->kobj, &dev->parent->kobj,
 					  "device");
 		if (error)


Patches currently in gregkh-2.6 which might be from cornelia.huck@de.ibm.com are

driver/kobject-fix-link-error-when-config_hotplug-is-disabled.patch
driver/driver-core-revert-device-link-creation-check.patch
driver/kobject-update-documentation.patch
driver/kset-kernel-doc-cleanups.patch

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-07-30 19:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24  6:39 sysfs/udev broken in latest git? Simon Arlott
2007-07-24  7:25 ` Greg KH
2007-07-24  8:03   ` Cornelia Huck
2007-07-24  8:46     ` Greg KH
2007-07-24  9:20       ` Kay Sievers
2007-07-24 11:49         ` Simon Arlott
2007-07-24 11:55           ` Kay Sievers
2007-07-24 12:00             ` Simon Arlott
2007-07-24 12:54         ` Cornelia Huck
2007-07-24 16:28           ` sysfs/udev broken in 2.6.23-rc1 [input, i2c, ...] (Was: sysfs/udev broken in latest git?) Simon Arlott
2007-07-24 16:34             ` Kay Sievers
2007-07-24 16:57               ` Simon Arlott
2007-07-25  0:19                 ` Kay Sievers
2007-07-25  7:58                   ` Cornelia Huck
2007-07-26  0:11                     ` Greg KH
2007-07-26  0:17                       ` Kay Sievers
2007-07-30 19:12                     ` patch driver-core-revert-device-link-creation-check.patch added to gregkh-2.6 tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox