mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* udev regression? lsusb silent (no output) since 2.6.22-rc2 at least
@ 2007-05-26 20:18 bert hubert
  2007-05-27  2:42 ` Kay Sievers
  2007-05-27  5:37 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: bert hubert @ 2007-05-26 20:18 UTC (permalink / raw)
  To: linux-kernel, gregkh; +Cc: kay.sievers

Greg, Kay, kernel people,

Today I booted 2.6.22-rc2 on Ubunty Edgy Eft, and lsusb died on me:

ahu@intel:~$ lsusb
ahu@intel:~$ sudo lsusb
ahu@intel:~$ 

This behaviour persists in rc4. This might be udev related. I'm running:
ii  udev                                   093-0ubuntu18.0edgy2 

USB does work fine.

Bit from strace:

open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 4096)    = 112
close(3)                                = 0
open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 4096)    = 112
getdents64(3, /* 0 entries */, 4096)    = 0
close(3)                                = 0
(end of program)

ahu@intel:~$ ls -l /dev/bus/usb -d
drwxr-xr-x 3 root root 80 2007-05-26 21:58 /dev/bus/usb

ahu@intel:~$ ls -l /dev/bus/usb/
total 0
lrwxrwxrwx 1 root root 14 2007-05-26 21:58 devices -> .usbfs/devices

ahu@intel:~$ ls -l /dev/bus/usb/devices 
lrwxrwxrwx 1 root root 14 2007-05-26 21:58 /dev/bus/usb/devices ->
.usbfs/devices

ahu@intel:~$ wc -l /dev/bus/usb/devices
95 /dev/bus/usb/devices

On another machine (debian etch), with an older kernel, where lsusb does
work:

open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 4096)    = 96
close(3)                                = 0 
open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 4096)    = 96
getdents64(3, /* 0 entries */, 4096)    = 0 
close(3)                                = 0 
open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=60, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 3 entries */, 4096)    = 72
open("/dev/bus/usb/001/001", O_RDWR)    = -1 EACCES (Permission denied)
open("/dev/bus/usb/001/001", O_RDONLY)  = 4

Any clues? Please let me know how I can help solve this problem!

	Bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at least
  2007-05-26 20:18 udev regression? lsusb silent (no output) since 2.6.22-rc2 at least bert hubert
@ 2007-05-27  2:42 ` Kay Sievers
  2007-05-27  9:25   ` bert hubert
  2007-05-27  5:37 ` Greg KH
  1 sibling, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2007-05-27  2:42 UTC (permalink / raw)
  To: bert hubert; +Cc: linux-kernel, gregkh

On Sat, 2007-05-26 at 22:18 +0200, bert hubert wrote:
> Today I booted 2.6.22-rc2 on Ubunty Edgy Eft, and lsusb died on me:
> 
> ahu@intel:~$ lsusb
> ahu@intel:~$ sudo lsusb
> ahu@intel:~$ 
> 
> This behaviour persists in rc4. This might be udev related. I'm running:
> ii  udev                                   093-0ubuntu18.0edgy2 
> 
> USB does work fine.
> 
> Bit from strace:
> 
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 112
> close(3)                                = 0
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 112
> getdents64(3, /* 0 entries */, 4096)    = 0
> close(3)                                = 0
> (end of program)
> 
> ahu@intel:~$ ls -l /dev/bus/usb -d
> drwxr-xr-x 3 root root 80 2007-05-26 21:58 /dev/bus/usb
> 
> ahu@intel:~$ ls -l /dev/bus/usb/
> total 0
> lrwxrwxrwx 1 root root 14 2007-05-26 21:58 devices -> .usbfs/devices
> 
> ahu@intel:~$ ls -l /dev/bus/usb/devices 
> lrwxrwxrwx 1 root root 14 2007-05-26 21:58 /dev/bus/usb/devices ->
> .usbfs/devices
> 
> ahu@intel:~$ wc -l /dev/bus/usb/devices
> 95 /dev/bus/usb/devices
> 
> On another machine (debian etch), with an older kernel, where lsusb does
> work:
> 
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 96
> close(3)                                = 0 
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 96
> getdents64(3, /* 0 entries */, 4096)    = 0 
> close(3)                                = 0 
> open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=60, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 3 entries */, 4096)    = 72
> open("/dev/bus/usb/001/001", O_RDWR)    = -1 EACCES (Permission denied)
> open("/dev/bus/usb/001/001", O_RDONLY)  = 4
> 
> Any clues? Please let me know how I can help solve this problem!

It works fine for me here. Do you have CONFIG_USB_DEVICE_CLASS=y set?

Kay


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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at least
  2007-05-26 20:18 udev regression? lsusb silent (no output) since 2.6.22-rc2 at least bert hubert
  2007-05-27  2:42 ` Kay Sievers
@ 2007-05-27  5:37 ` Greg KH
  1 sibling, 0 replies; 8+ messages in thread
From: Greg KH @ 2007-05-27  5:37 UTC (permalink / raw)
  To: bert hubert, linux-kernel, kay.sievers

On Sat, May 26, 2007 at 10:18:54PM +0200, bert hubert wrote:
> Greg, Kay, kernel people,
> 
> Today I booted 2.6.22-rc2 on Ubunty Edgy Eft, and lsusb died on me:
> 
> ahu@intel:~$ lsusb
> ahu@intel:~$ sudo lsusb
> ahu@intel:~$ 
> 
> This behaviour persists in rc4. This might be udev related. I'm running:
> ii  udev                                   093-0ubuntu18.0edgy2 
> 
> USB does work fine.
> 
> Bit from strace:
> 
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 112
> close(3)                                = 0
> open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
> fstat64(3, {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
> getdents64(3, /* 4 entries */, 4096)    = 112
> getdents64(3, /* 0 entries */, 4096)    = 0
> close(3)                                = 0
> (end of program)
> 
> ahu@intel:~$ ls -l /dev/bus/usb -d
> drwxr-xr-x 3 root root 80 2007-05-26 21:58 /dev/bus/usb
> 
> ahu@intel:~$ ls -l /dev/bus/usb/
> total 0
> lrwxrwxrwx 1 root root 14 2007-05-26 21:58 devices -> .usbfs/devices
> 
> ahu@intel:~$ ls -l /dev/bus/usb/devices 
> lrwxrwxrwx 1 root root 14 2007-05-26 21:58 /dev/bus/usb/devices ->
> .usbfs/devices
> 
> ahu@intel:~$ wc -l /dev/bus/usb/devices
> 95 /dev/bus/usb/devices
> 
> On another machine (debian etch), with an older kernel, where lsusb does
> work:

What is that kernel version?

This works fine for me here too...

thanks,

greg k-h

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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at  least
  2007-05-27  2:42 ` Kay Sievers
@ 2007-05-27  9:25   ` bert hubert
  2007-05-27 14:10     ` Kay Sievers
  0 siblings, 1 reply; 8+ messages in thread
From: bert hubert @ 2007-05-27  9:25 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, gregkh

On Sun, May 27, 2007 at 04:42:35AM +0200, Kay Sievers wrote:
> > Any clues? Please let me know how I can help solve this problem!
> 
> It works fine for me here. Do you have CONFIG_USB_DEVICE_CLASS=y set?

Ah, I have not. However, this setting was not present in 2.6.21-rc3, from
which configuration I ran 'make oldconfig'.

Make oldconfig does ask for this feature:
  USB device class-devices (DEPRECATED) (USB_DEVICE_CLASS) [N/y/?] (NEW) 

And I chose the default, breaking (my version of) lsusb, on Ubuntu Edgy Eft.
I enabled USB_DEVICE_CLASS, and lsusb worked again.

Thank you both for your quick answers!

Please consider this patch which clarifies the need for USB_DEVICE_CLASS:

--- ./drivers/usb/core/Kconfig~	2007-05-27 11:22:22.000000000 +0200
+++ ./drivers/usb/core/Kconfig	2007-05-27 11:22:22.000000000 +0200
@@ -54,7 +54,8 @@
 	  device of the interface and therefore easily accessible from the interface
 	  event.
 
-	  This option provides backward compatibility if needed.
+	  This option provides backward compatibility and is required on
+	  many distributions to keep lsusb working.
 
 config USB_DYNAMIC_MINORS
 	bool "Dynamic USB minor allocation (EXPERIMENTAL)"

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at  least
  2007-05-27  9:25   ` bert hubert
@ 2007-05-27 14:10     ` Kay Sievers
  2007-05-27 14:20       ` bert hubert
  0 siblings, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2007-05-27 14:10 UTC (permalink / raw)
  To: bert hubert; +Cc: linux-kernel, gregkh

On Sun, 2007-05-27 at 11:25 +0200, bert hubert wrote:
> On Sun, May 27, 2007 at 04:42:35AM +0200, Kay Sievers wrote:
> > > Any clues? Please let me know how I can help solve this problem!
> > 
> > It works fine for me here. Do you have CONFIG_USB_DEVICE_CLASS=y set?
> 
> Ah, I have not. However, this setting was not present in 2.6.21-rc3, from
> which configuration I ran 'make oldconfig'.
> 
> Make oldconfig does ask for this feature:
>   USB device class-devices (DEPRECATED) (USB_DEVICE_CLASS) [N/y/?] (NEW) 
> 
> And I chose the default, breaking (my version of) lsusb, on Ubuntu Edgy Eft.
> I enabled USB_DEVICE_CLASS, and lsusb worked again.
> 
> Thank you both for your quick answers!
> 
> Please consider this patch which clarifies the need for USB_DEVICE_CLASS:
> 
> --- ./drivers/usb/core/Kconfig~	2007-05-27 11:22:22.000000000 +0200
> +++ ./drivers/usb/core/Kconfig	2007-05-27 11:22:22.000000000 +0200
> @@ -54,7 +54,8 @@
>  	  device of the interface and therefore easily accessible from the interface
>  	  event.
>  
> -	  This option provides backward compatibility if needed.
> +	  This option provides backward compatibility and is required on
> +	  many distributions to keep lsusb working.

Yeah, a bit more text may be helpful. Many systems still use usbfs and
should work just fine without that option. Adding a udev rule will also
work.
The next version of HAL will depend on that udev rule. We have seen too
many unpredictable event timing problems with the usb_device class, and
will switch to the nodes provided directly by the usb-device instead of
the separate class device. How does that help text sound?

  This option provides backward compatibility for systems where
  usbfs is not mounted, and no udev rule like this exists:
    SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
      NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"

Thanks,
Kay


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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at   least
  2007-05-27 14:10     ` Kay Sievers
@ 2007-05-27 14:20       ` bert hubert
  2007-05-27 14:34         ` Kay Sievers
  0 siblings, 1 reply; 8+ messages in thread
From: bert hubert @ 2007-05-27 14:20 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, gregkh

> the separate class device. How does that help text sound?
> 
>   This option provides backward compatibility for systems where
>   usbfs is not mounted, and no udev rule like this exists:
>     SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
>       NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"

I'm mounting my Linus hat now, but the more I think about the
insta-deprecation of USB_DEVICE_CLASS, and killing lsusb in even a very
recent distribution release, I think this is an ABI or API change.

And we hate those.

So instead of papering this breakage over with cleverly worded help texts
that suggest a solution, how about we set USB_DEVICE_CLASS to 'y' by default
for a few more releases?

It would sure save a lot of lkml traffic on 'lsusb broke!'.

If this is unacceptable, please at least retain the word 'lsusb' somewhere
in the help text, so people have at least the chance to spot their (current)
need for USB_DEVICE_CLASS.

Perhaps:

"Some distributions need this feature for lsusb to work, unless the udev rule
 above is configured".

	Bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at  least
  2007-05-27 14:20       ` bert hubert
@ 2007-05-27 14:34         ` Kay Sievers
  2007-05-27 14:40           ` bert hubert
  0 siblings, 1 reply; 8+ messages in thread
From: Kay Sievers @ 2007-05-27 14:34 UTC (permalink / raw)
  To: bert hubert; +Cc: linux-kernel, gregkh

On Sun, 2007-05-27 at 16:20 +0200, bert hubert wrote:
> > the separate class device. How does that help text sound?
> > 
> >   This option provides backward compatibility for systems where
> >   usbfs is not mounted, and no udev rule like this exists:
> >     SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
> >       NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
> 
> I'm mounting my Linus hat now, but the more I think about the
> insta-deprecation of USB_DEVICE_CLASS, and killing lsusb in even a very
> recent distribution release, I think this is an ABI or API change.
> 
> And we hate those.

There is no breakage at all. Nothing has changed regarding ABI/API. It's
just a feature that is configurable now, that was always built-in in
older kernels. That's all, and correctly configured kernels don't break
anything.

> So instead of papering this breakage over with cleverly worded help texts
> that suggest a solution, how about we set USB_DEVICE_CLASS to 'y' by default
> for a few more releases?

Makes sense, yes.

> It would sure save a lot of lkml traffic on 'lsusb broke!'.
> 
> If this is unacceptable, please at least retain the word 'lsusb' somewhere
> in the help text, so people have at least the chance to spot their (current)
> need for USB_DEVICE_CLASS.
> 
> Perhaps:
> 
> "Some distributions need this feature for lsusb to work, unless the udev rule
>  above is configured".

It's libusb access in general and not specific to lsusb.

Kay


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

* Re: udev regression? lsusb silent (no output) since 2.6.22-rc2 at    least
  2007-05-27 14:34         ` Kay Sievers
@ 2007-05-27 14:40           ` bert hubert
  0 siblings, 0 replies; 8+ messages in thread
From: bert hubert @ 2007-05-27 14:40 UTC (permalink / raw)
  To: Kay Sievers; +Cc: linux-kernel, gregkh

On Sun, May 27, 2007 at 04:34:37PM +0200, Kay Sievers wrote:
> older kernels. That's all, and correctly configured kernels don't break
> anything.
> 
> > So instead of papering this breakage over with cleverly worded help texts
> > that suggest a solution, how about we set USB_DEVICE_CLASS to 'y' by default
> > for a few more releases?
> 
> Makes sense, yes.

Good to hear - I also want my kernel to be configured correctly, of course,
but I'm also happy if 'make oldconfig' keeps my correctly configured kernel,
configured correctly.

So USB_DEVICE_CLASS='y' for a few more cycles is like music to my ears. 

> > "Some distributions need this feature for lsusb to work, unless the udev rule
> >  above is configured".
> 
> It's libusb access in general and not specific to lsusb.

"Some distributions need this feature for libusb-based applications (like
 lsusb) to work, unless the udev rule above is configured"

The reason I stress lsusb so much is because for many operators, it is the
first thing they do in case of USB problems 'is my device even there?'.

So it would be what people notice breaking - even though the underlying
issue is with libusb.

Thanks!

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://netherlabs.nl              Open and Closed source services

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

end of thread, other threads:[~2007-05-27 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-26 20:18 udev regression? lsusb silent (no output) since 2.6.22-rc2 at least bert hubert
2007-05-27  2:42 ` Kay Sievers
2007-05-27  9:25   ` bert hubert
2007-05-27 14:10     ` Kay Sievers
2007-05-27 14:20       ` bert hubert
2007-05-27 14:34         ` Kay Sievers
2007-05-27 14:40           ` bert hubert
2007-05-27  5:37 ` Greg KH

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

all inboxes | Powered by JetHome®