linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gregkh-all causes breakage
@ 2007-01-26 20:02 Alan Stern
  2007-01-26 20:18 ` Greg KH
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Alan Stern @ 2007-01-26 20:02 UTC (permalink / raw)
  To: linux-hotplug

Greg:

I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
versions too) causes sd_mod not to be loaded automatically when I plug in
a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.  
This is on a system running FC6.

I have no clear idea of what's behind this.  Maybe some of those class 
device changes Kay has been making.  Or could it be that I don't have 
inotify enabled (hard to see what difference that would make)?  Or maybe 
the udev scripts need updating?

Do you experience the same thing?  Where's a good place to look for 
answers?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
@ 2007-01-26 20:18 ` Greg KH
  2007-01-26 20:27 ` Andrey Borzenkov
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2007-01-26 20:18 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> Greg:
> 
> I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> versions too) causes sd_mod not to be loaded automatically when I plug in
> a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.  
> This is on a system running FC6.
> 
> I have no clear idea of what's behind this.  Maybe some of those class 
> device changes Kay has been making.  Or could it be that I don't have 
> inotify enabled (hard to see what difference that would make)?  Or maybe 
> the udev scripts need updating?
> 
> Do you experience the same thing?  Where's a good place to look for 
> answers?

Hm, I have the sd_mod build into my kernels as they rely on SATA drives
:)

I'll go dig up an older laptop that doesn't have that and see what
happens.

Kay, any thoughts?

thanks,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
  2007-01-26 20:18 ` Greg KH
@ 2007-01-26 20:27 ` Andrey Borzenkov
  2007-01-26 20:31 ` Andrey Borzenkov
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrey Borzenkov @ 2007-01-26 20:27 UTC (permalink / raw)
  To: linux-hotplug

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

On Friday 26 January 2007 23:18, Greg KH wrote:
> On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > Greg:
> >
> > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > versions too) causes sd_mod not to be loaded automatically when I plug in
> > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.
> > This is on a system running FC6.
> >
> > I have no clear idea of what's behind this.  Maybe some of those class
> > device changes Kay has been making.  Or could it be that I don't have
> > inotify enabled (hard to see what difference that would make)?  Or maybe
> > the udev scripts need updating?
> >
> > Do you experience the same thing?  Where's a good place to look for
> > answers?
>
> Hm, I have the sd_mod build into my kernels as they rely on SATA drives
>

Huh? I have libata/pata/sd_mod as modules :)

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

iD8DBQFFumQqR6LMutpd94wRAnqXAJ4iUe6l+AYQkEpAHxnDKfwtLSigkACeKS7T
rk6vxzDdpzwDQf5FP13Ntb4=Pz22
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
  2007-01-26 20:18 ` Greg KH
  2007-01-26 20:27 ` Andrey Borzenkov
@ 2007-01-26 20:31 ` Andrey Borzenkov
  2007-01-26 20:39 ` Greg KH
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Andrey Borzenkov @ 2007-01-26 20:31 UTC (permalink / raw)
  To: linux-hotplug

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

On Friday 26 January 2007 23:27, Andrey Borzenkov wrote:
> > Hm, I have the sd_mod build into my kernels as they rely on SATA drives
>
> Huh? I have libata/pata/sd_mod as modules :)
>

oops, sorry, ignore this; it is the effect of git bisect :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFumUGR6LMutpd94wRAu4hAJ0Q9qnrR5mnkTAA+TxxXWUAxkvZbgCfYgG+
eZcnUCTIADF8nd90GEnd9cg=lzf1
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (2 preceding siblings ...)
  2007-01-26 20:31 ` Andrey Borzenkov
@ 2007-01-26 20:39 ` Greg KH
  2007-01-26 20:56 ` Kay Sievers
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2007-01-26 20:39 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 26, 2007 at 11:27:20PM +0300, Andrey Borzenkov wrote:
> On Friday 26 January 2007 23:18, Greg KH wrote:
> > On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > > Greg:
> > >
> > > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > > versions too) causes sd_mod not to be loaded automatically when I plug in
> > > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.
> > > This is on a system running FC6.
> > >
> > > I have no clear idea of what's behind this.  Maybe some of those class
> > > device changes Kay has been making.  Or could it be that I don't have
> > > inotify enabled (hard to see what difference that would make)?  Or maybe
> > > the udev scripts need updating?
> > >
> > > Do you experience the same thing?  Where's a good place to look for
> > > answers?
> >
> > Hm, I have the sd_mod build into my kernels as they rely on SATA drives
> >
> 
> Huh? I have libata/pata/sd_mod as modules :)

Yes, I could do that, but I tend to only use modules for things that I
am developing for (usb drivers, etc.)  Saves me from looking at huge
long lists of 'lsmod' outputs :)

thanks,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (3 preceding siblings ...)
  2007-01-26 20:39 ` Greg KH
@ 2007-01-26 20:56 ` Kay Sievers
  2007-01-26 20:59 ` Kay Sievers
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Kay Sievers @ 2007-01-26 20:56 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 2007-01-26 at 12:18 -0800, Greg KH wrote:
> On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > Greg:
> > 
> > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > versions too) causes sd_mod not to be loaded automatically when I plug in
> > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.  
> > This is on a system running FC6.
> > 
> > I have no clear idea of what's behind this.  Maybe some of those class 
> > device changes Kay has been making.  Or could it be that I don't have 
> > inotify enabled (hard to see what difference that would make)?  Or maybe 
> > the udev scripts need updating?
> > 
> > Do you experience the same thing?  Where's a good place to look for 
> > answers?
> 
> Hm, I have the sd_mod build into my kernels as they rely on SATA drives
> :)
> 
> I'll go dig up an older laptop that doesn't have that and see what
> happens.
> 
> Kay, any thoughts?

I don't think sd_mod was ever "autoloaded". On SUSE we just load it
manually in initramfs.

And usually distros ship a udev rule like:
  SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="0|7|14", \
    RUN+="/sbin/modprobe sd_mod"

I have no idea what makes FC6 behave differently with the
gregkh-all-2.6.20-rc5.patch.

We should probably just add modaliases to the scsi_device, just like we
added to the ide-devices to load the mid-layer modules.

Thanks,
Kay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (4 preceding siblings ...)
  2007-01-26 20:56 ` Kay Sievers
@ 2007-01-26 20:59 ` Kay Sievers
  2007-01-26 22:10 ` Greg KH
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Kay Sievers @ 2007-01-26 20:59 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 2007-01-26 at 12:39 -0800, Greg KH wrote:
> On Fri, Jan 26, 2007 at 11:27:20PM +0300, Andrey Borzenkov wrote:
> > On Friday 26 January 2007 23:18, Greg KH wrote:
> > > On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > > > Greg:
> > > >
> > > > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > > > versions too) causes sd_mod not to be loaded automatically when I plug in
> > > > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.
> > > > This is on a system running FC6.
> > > >
> > > > I have no clear idea of what's behind this.  Maybe some of those class
> > > > device changes Kay has been making.  Or could it be that I don't have
> > > > inotify enabled (hard to see what difference that would make)?  Or maybe
> > > > the udev scripts need updating?
> > > >
> > > > Do you experience the same thing?  Where's a good place to look for
> > > > answers?
> > >
> > > Hm, I have the sd_mod build into my kernels as they rely on SATA drives
> > >
> > 
> > Huh? I have libata/pata/sd_mod as modules :)
> 
> Yes, I could do that, but I tend to only use modules for things that I
> am developing for (usb drivers, etc.)  Saves me from looking at huge
> long lists of 'lsmod' outputs :)

Yeah, you would need to build an initramfs image to find your root-disk
then, that's the main reason I don't use it. I have grub pointing
directly to the kernel-image in the source tree. :)

Kay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (5 preceding siblings ...)
  2007-01-26 20:59 ` Kay Sievers
@ 2007-01-26 22:10 ` Greg KH
  2007-01-27  1:32 ` Alan Stern
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2007-01-26 22:10 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jan 26, 2007 at 09:59:37PM +0100, Kay Sievers wrote:
> On Fri, 2007-01-26 at 12:39 -0800, Greg KH wrote:
> > On Fri, Jan 26, 2007 at 11:27:20PM +0300, Andrey Borzenkov wrote:
> > > On Friday 26 January 2007 23:18, Greg KH wrote:
> > > > On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > > > > Greg:
> > > > >
> > > > > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > > > > versions too) causes sd_mod not to be loaded automatically when I plug in
> > > > > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.
> > > > > This is on a system running FC6.
> > > > >
> > > > > I have no clear idea of what's behind this.  Maybe some of those class
> > > > > device changes Kay has been making.  Or could it be that I don't have
> > > > > inotify enabled (hard to see what difference that would make)?  Or maybe
> > > > > the udev scripts need updating?
> > > > >
> > > > > Do you experience the same thing?  Where's a good place to look for
> > > > > answers?
> > > >
> > > > Hm, I have the sd_mod build into my kernels as they rely on SATA drives
> > > >
> > > 
> > > Huh? I have libata/pata/sd_mod as modules :)
> > 
> > Yes, I could do that, but I tend to only use modules for things that I
> > am developing for (usb drivers, etc.)  Saves me from looking at huge
> > long lists of 'lsmod' outputs :)
> 
> Yeah, you would need to build an initramfs image to find your root-disk
> then, that's the main reason I don't use it. I have grub pointing
> directly to the kernel-image in the source tree. :)

You know, that's a good idea, I need to try that out, save me some
typing for every new kernel version :)

thanks,

greg k-h

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (6 preceding siblings ...)
  2007-01-26 22:10 ` Greg KH
@ 2007-01-27  1:32 ` Alan Stern
  2007-01-27 21:38 ` Alan Stern
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alan Stern @ 2007-01-27  1:32 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 26 Jan 2007, Greg KH wrote:

> > Yeah, you would need to build an initramfs image to find your root-disk
> > then, that's the main reason I don't use it. I have grub pointing
> > directly to the kernel-image in the source tree. :)
> 
> You know, that's a good idea, I need to try that out, save me some
> typing for every new kernel version :)

For my testing, I have the following shell script stored as 
/root/bin/installkernel:

	#!/bin/sh

	echo Installing system for $1
	cp $3 /boot/System.map-$1
	cp $2 /boot/vmlinuz-$1
	rm -f /boot/test-2.6
	ln -s vmlinuz-$1 /boot/test-2.6

Then the grub.conf file merely has to refer to /boot/test-2.6.  Of course, 
this wouldn't work if you wanted to have more than one test kernel 
available at a time.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (7 preceding siblings ...)
  2007-01-27  1:32 ` Alan Stern
@ 2007-01-27 21:38 ` Alan Stern
  2007-01-28  0:45 ` Kay Sievers
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alan Stern @ 2007-01-27 21:38 UTC (permalink / raw)
  To: linux-hotplug

On Fri, 26 Jan 2007, Kay Sievers wrote:

> On Fri, 2007-01-26 at 12:18 -0800, Greg KH wrote:
> > On Fri, Jan 26, 2007 at 03:02:31PM -0500, Alan Stern wrote:
> > > Greg:
> > > 
> > > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > > versions too) causes sd_mod not to be loaded automatically when I plug in
> > > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.  
> > > This is on a system running FC6.
> > > 
> > > I have no clear idea of what's behind this.  Maybe some of those class 
> > > device changes Kay has been making.  Or could it be that I don't have 
> > > inotify enabled (hard to see what difference that would make)?  Or maybe 
> > > the udev scripts need updating?
> > > 
> > > Do you experience the same thing?  Where's a good place to look for 
> > > answers?
> > 
> > Hm, I have the sd_mod build into my kernels as they rely on SATA drives
> > :)
> > 
> > I'll go dig up an older laptop that doesn't have that and see what
> > happens.
> > 
> > Kay, any thoughts?
> 
> I don't think sd_mod was ever "autoloaded". On SUSE we just load it
> manually in initramfs.
> 
> And usually distros ship a udev rule like:
>   SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="0|7|14", \
>     RUN+="/sbin/modprobe sd_mod"

That's almost exactly what I have in /etc/udev/rules.d/50-udev.rules.  
Here's the actual text:

ACTION="add", SUBSYSTEM="scsi_device", SYSFS{type}="0|7|14", \
       RUN+="/sbin/modprobe sd_mod"

It works perfectly well with vanilla 2.6.20-rc5.  With the gregkh-all
patch applied this rule does not trigger.  Through experimentation I found 
that the SYSFS{type} match is responsible.

The actual contents of the "type" attribute file is "0".  But even if I
simplify the rule to SYSFS{type}="0", it still doesn't trigger.  If I
remove that key-value pair entirely then it does trigger, but obviously
this isn't a good solution.

BTW, the corresponding rule for loading the sg driver is this:

ACTION="add", SUBSYSTEM="scsi_device" RUN+="/sbin/modprobe sg"

Notice the absence of SYSFS{type} -- presumably that's why it still works.  
Notice also the lack of a comma separating the SUBSYSTEM and RUN key-value 
pairs.  This violates udev's documented format for rules.  How come it 
gets accepted?  Is the documentation wrong?

> I have no idea what makes FC6 behave differently with the
> gregkh-all-2.6.20-rc5.patch.

Is there any way to get udevd to output a log of its rule-matching
procedure?  (Like adding a "DEBUG=1" key-value pair?)  Or will I have to
build a custom version of the program to do it?

Alan Stern

PS: The man page for udevinfo could be improved a lot.  Apart from typos
and grammatical errors, it is very confusing.  For example, it starts out
by saying "udevinfo queries the udev database...".  What on Earth is the
udev database?

Also, a lot of queries that appear perfectly legal don't generate any 
useful output.  Should the -q and -a options be listed as separate command 
invocations instead of on the same line?  Are -p and -n mutually 
exclusive?  Is there any point in mixing -e with anything else?  Etc...


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (8 preceding siblings ...)
  2007-01-27 21:38 ` Alan Stern
@ 2007-01-28  0:45 ` Kay Sievers
  2007-01-29  8:32 ` Guennadi Liakhovetski
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Kay Sievers @ 2007-01-28  0:45 UTC (permalink / raw)
  To: linux-hotplug

On Sat, 2007-01-27 at 16:38 -0500, Alan Stern wrote:
> > > > I've found that running with your gregkh-all-2.6.20-rc5.patch (earlier
> > > > versions too) causes sd_mod not to be loaded automatically when I plug in
> > > > a USB flash drive.  Somewhat suprisingly, the sg driver _is_ loaded.  
> > > > This is on a system running FC6.
> > > > 
> > > > I have no clear idea of what's behind this.  Maybe some of those class 
> > > > device changes Kay has been making.  Or could it be that I don't have 
> > > > inotify enabled (hard to see what difference that would make)?  Or maybe 
> > > > the udev scripts need updating?
> > > > 
> > > > Do you experience the same thing?  Where's a good place to look for 
> > > > answers?

> > I don't think sd_mod was ever "autoloaded". On SUSE we just load it
> > manually in initramfs.
> > 
> > And usually distros ship a udev rule like:
> >   SUBSYSTEM="scsi_device", ACTION="add", ATTRS{type}="0|7|14", \
> >     RUN+="/sbin/modprobe sd_mod"
> 
> That's almost exactly what I have in /etc/udev/rules.d/50-udev.rules.  
> Here's the actual text:
> 
> ACTION="add", SUBSYSTEM="scsi_device", SYSFS{type}="0|7|14", \
>        RUN+="/sbin/modprobe sd_mod"
> 
> It works perfectly well with vanilla 2.6.20-rc5.  With the gregkh-all
> patch applied this rule does not trigger.  Through experimentation I found 
> that the SYSFS{type} match is responsible.
> 
> The actual contents of the "type" attribute file is "0".  But even if I
> simplify the rule to SYSFS{type}="0", it still doesn't trigger.  If I
> remove that key-value pair entirely then it does trigger, but obviously
> this isn't a good solution.

Hmm, that seems to work fine for here:
  $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
  main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from subsystem 'scsi_device'
  main: run: '/sbin/modprobe sd_mod'
  main: run: '/sbin/modprobe sg'
  ...

What udev version do you have?

> BTW, the corresponding rule for loading the sg driver is this:
> 
> ACTION="add", SUBSYSTEM="scsi_device" RUN+="/sbin/modprobe sg"
> 
> Notice the absence of SYSFS{type} -- presumably that's why it still works.  
> Notice also the lack of a comma separating the SUBSYSTEM and RUN key-value 
> pairs.  This violates udev's documented format for rules.  How come it 
> gets accepted?  Is the documentation wrong?

Hmm, this works by accident. :) The comma is usually needed.

> > I have no idea what makes FC6 behave differently with the
> > gregkh-all-2.6.20-rc5.patch.
> 
> Is there any way to get udevd to output a log of its rule-matching
> procedure?  (Like adding a "DEBUG=1" key-value pair?)  Or will I have to
> build a custom version of the program to do it?

Most of the messages of the rules processing are only compiled in, if
DEBUG=true is given at build time. The logging level of udevd can be
changed with udevcontrol, and then it logs to syslog, but all the real
debug information is usually not compiled in.

> PS: The man page for udevinfo could be improved a lot.  Apart from typos
> and grammatical errors, it is very confusing.  For example, it starts out
> by saying "udevinfo queries the udev database...".  What on Earth is the
> udev database?

The files that tell udev what node to remove on "remove" event. We can't
match on anything so we need to store the names of the node and the
symlinks. It's in /dev/.udev/db/.

> Also, a lot of queries that appear perfectly legal don't generate any 
> useful output.  Should the -q and -a options be listed as separate command 
> invocations instead of on the same line?  Are -p and -n mutually 
> exclusive?  Is there any point in mixing -e with anything else?  Etc...

Yeah, that could get some better documentation,

Thanks,
Kay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (9 preceding siblings ...)
  2007-01-28  0:45 ` Kay Sievers
@ 2007-01-29  8:32 ` Guennadi Liakhovetski
  2007-01-29 15:27 ` Alan Stern
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Guennadi Liakhovetski @ 2007-01-29  8:32 UTC (permalink / raw)
  To: linux-hotplug

On Sat, 27 Jan 2007, Alan Stern wrote:

> Is there any way to get udevd to output a log of its rule-matching
> procedure?  (Like adding a "DEBUG=1" key-value pair?)  Or will I have to
> build a custom version of the program to do it?

Would this help:

$ cat /etc/udev/udev.conf
# udev.conf

# The initial syslog(3) priority: "err", "info", "debug" or its
# numerical equivalent. For runtime debugging, the daemons internal
# state can be changed with: "udevcontrol log_priority=<value>".
udev_log="err"

or you want only pair matching debugging?

Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (10 preceding siblings ...)
  2007-01-29  8:32 ` Guennadi Liakhovetski
@ 2007-01-29 15:27 ` Alan Stern
  2007-01-29 15:48 ` Alan Stern
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Alan Stern @ 2007-01-29 15:27 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 29 Jan 2007, Guennadi Liakhovetski wrote:

> On Sat, 27 Jan 2007, Alan Stern wrote:
> 
> > Is there any way to get udevd to output a log of its rule-matching
> > procedure?  (Like adding a "DEBUG=1" key-value pair?)  Or will I have to
> > build a custom version of the program to do it?
> 
> Would this help:
> 
> $ cat /etc/udev/udev.conf
> # udev.conf
> 
> # The initial syslog(3) priority: "err", "info", "debug" or its
> # numerical equivalent. For runtime debugging, the daemons internal
> # state can be changed with: "udevcontrol log_priority=<value>".
> udev_log="err"
> 
> or you want only pair matching debugging?

I was already aware of this.

No, what I would have liked is key-matching debugging that could be turned 
on and off for individual rules.  For instance, when

	DEBUG=1

occurs in a rule, then all matching for following key-value pairs in that
rule would produce debugging output until a

	DEBUG=0

pair is encountered.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (11 preceding siblings ...)
  2007-01-29 15:27 ` Alan Stern
@ 2007-01-29 15:48 ` Alan Stern
  2007-01-31  8:17 ` Kay Sievers
  2007-01-31  8:41 ` Tobias Powalowski
  14 siblings, 0 replies; 16+ messages in thread
From: Alan Stern @ 2007-01-29 15:48 UTC (permalink / raw)
  To: linux-hotplug

On Sun, 28 Jan 2007, Kay Sievers wrote:

> Hmm, that seems to work fine for here:
>   $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
>   main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from subsystem 'scsi_device'
>   main: run: '/sbin/modprobe sd_mod'
>   main: run: '/sbin/modprobe sg'
>   ...

Interesting.  Here's what I get (with the USB flash drive already plugged 
in):

	$ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
	main: unable to open '/sys/subsystem/scsi_device/devices/0:0:0:0'
	$
	$ udevtest /subsystem/scsi_device/devices/0:0:0:0
	main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from subsystem ''
	main: run: 'socket:/org/kernel/udev/monitor'
	main: run: '/lib/udev/udev_run_devd'
	main: run: 'socket:/org/freedesktop/hal/udev_event'

> What udev version do you have?

This is probably the key to the problem.  My udev is the one shipped with 
FC6:

	$ udevinfo -V
	udevinfo, version 095

Of course, that includes a number of patches added by RedHat; it isn't a
vanilla udev 095.  Could it be the move to the "subsystem" directory that
is responsible for these failures?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (12 preceding siblings ...)
  2007-01-29 15:48 ` Alan Stern
@ 2007-01-31  8:17 ` Kay Sievers
  2007-01-31  8:41 ` Tobias Powalowski
  14 siblings, 0 replies; 16+ messages in thread
From: Kay Sievers @ 2007-01-31  8:17 UTC (permalink / raw)
  To: linux-hotplug

On 1/29/07, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Sun, 28 Jan 2007, Kay Sievers wrote:
>
> > Hmm, that seems to work fine for here:
> >   $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
> >   main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from subsystem 'scsi_device'
> >   main: run: '/sbin/modprobe sd_mod'
> >   main: run: '/sbin/modprobe sg'
> >   ...
>
> Interesting.  Here's what I get (with the USB flash drive already plugged
> in):
>
>         $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
>         main: unable to open '/sys/subsystem/scsi_device/devices/0:0:0:0'
>         $
>         $ udevtest /subsystem/scsi_device/devices/0:0:0:0
>         main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from subsystem ''
>         main: run: 'socket:/org/kernel/udev/monitor'
>         main: run: '/lib/udev/udev_run_devd'
>         main: run: 'socket:/org/freedesktop/hal/udev_event'
>
> > What udev version do you have?
>
> This is probably the key to the problem.  My udev is the one shipped with
> FC6:
>
>         $ udevinfo -V
>         udevinfo, version 095
>
> Of course, that includes a number of patches added by RedHat; it isn't a
> vanilla udev 095.  Could it be the move to the "subsystem" directory that
> is responsible for these failures?

Right, the "subsystem"-patch in Greg's tree requires a more recent
udev version than 095 to run rules that match on sysfs files, all
device nodes should be created though.

Kay

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: gregkh-all causes breakage
  2007-01-26 20:02 gregkh-all causes breakage Alan Stern
                   ` (13 preceding siblings ...)
  2007-01-31  8:17 ` Kay Sievers
@ 2007-01-31  8:41 ` Tobias Powalowski
  14 siblings, 0 replies; 16+ messages in thread
From: Tobias Powalowski @ 2007-01-31  8:41 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 2493 bytes --]

Am Mittwoch 31 Januar 2007 schrieb Kay Sievers:
> On 1/29/07, Alan Stern <stern@rowland.harvard.edu> wrote:
> > On Sun, 28 Jan 2007, Kay Sievers wrote:
> > > Hmm, that seems to work fine for here:
> > >   $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
> > >   main: looking at device '/subsystem/scsi_device/devices/0:0:0:0' from
> > > subsystem 'scsi_device' main: run: '/sbin/modprobe sd_mod'
> > >   main: run: '/sbin/modprobe sg'
> > >   ...
> >
> > Interesting.  Here's what I get (with the USB flash drive already plugged
> > in):
> >
> >         $ udevtest /sys/subsystem/scsi_device/devices/0:0:0:0
> >         main: unable to open '/sys/subsystem/scsi_device/devices/0:0:0:0'
> >         $
> >         $ udevtest /subsystem/scsi_device/devices/0:0:0:0
> >         main: looking at device '/subsystem/scsi_device/devices/0:0:0:0'
> > from subsystem '' main: run: 'socket:/org/kernel/udev/monitor'
> >         main: run: '/lib/udev/udev_run_devd'
> >         main: run: 'socket:/org/freedesktop/hal/udev_event'
> >
> > > What udev version do you have?
> >
> > This is probably the key to the problem.  My udev is the one shipped with
> > FC6:
> >
> >         $ udevinfo -V
> >         udevinfo, version 095
> >
> > Of course, that includes a number of patches added by RedHat; it isn't a
> > vanilla udev 095.  Could it be the move to the "subsystem" directory that
> > is responsible for these failures?
>
> Right, the "subsystem"-patch in Greg's tree requires a more recent
> udev version than 095 to run rules that match on sysfs files, all
> device nodes should be created though.
>
> Kay
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Hi
just tried 20rc6 with latest udev here on archlinux, all modules are loaded 
fine with our rules.
greetings
tpowa
-- 
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2007-01-31  8:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 20:02 gregkh-all causes breakage Alan Stern
2007-01-26 20:18 ` Greg KH
2007-01-26 20:27 ` Andrey Borzenkov
2007-01-26 20:31 ` Andrey Borzenkov
2007-01-26 20:39 ` Greg KH
2007-01-26 20:56 ` Kay Sievers
2007-01-26 20:59 ` Kay Sievers
2007-01-26 22:10 ` Greg KH
2007-01-27  1:32 ` Alan Stern
2007-01-27 21:38 ` Alan Stern
2007-01-28  0:45 ` Kay Sievers
2007-01-29  8:32 ` Guennadi Liakhovetski
2007-01-29 15:27 ` Alan Stern
2007-01-29 15:48 ` Alan Stern
2007-01-31  8:17 ` Kay Sievers
2007-01-31  8:41 ` Tobias Powalowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).