linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb.rc - fix coldplug on 2.6 (no lister defined)
@ 2003-08-06 19:12 Andrey Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Borzenkov @ 2003-08-06 19:12 UTC (permalink / raw)
  To: linux-hotplug

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

On 2.6 lister is not used, but coldplug does not pass any information 
sufficient to find module. The patch makes it use sysfs and pass DEVPATH so 
usb.agent can get them from sysfs.

regards

-andrey

[-- Attachment #2: hotplug-2003_05_01-usb.rc-coldplug26.patch --]
[-- Type: text/x-diff, Size: 986 bytes --]

--- hotplug-2003_05_01/etc/hotplug/usb.rc.coldplug26	2003-07-31 14:39:01.000000000 +0400
+++ hotplug-2003_05_01/etc/hotplug/usb.rc	2003-07-31 23:40:17.000000000 +0400
@@ -125,6 +125,9 @@
 	DEVICE=
 	export DEVFS DEVICE
 
+	DEVPATH=
+	export DEVPATH
+
 	# these notifications will be handled by usbmodules
 	# NOTE: we're not providing a full set of hotplug
 	# parameters for USB.  that's why "usbmodules" is a
@@ -134,10 +137,21 @@
 	# FIXME usbmodules, or something, should set real
 	# PRODUCT and DEVICE strings so /etc/hotplug/usb/*
 	# scripts can rely on them ...
-	for DEVICE in /proc/bus/usb/*/*
-	do
+	#
+	# for 2.6 lister is disabled so either this should be fixed
+	# or we just use sysfs
+	if [ -d /sys/bus/usb/devices ]; then
+	    declare device
+	    for device in /sys/bus/usb/devices/*; do
+		DEVPATH=${device#/sys/}
 		/etc/hotplug/usb.agent
-	done
+	    done
+	else
+	    for DEVICE in /proc/bus/usb/*/*
+	    do
+		    /etc/hotplug/usb.agent
+	    done
+	fi
 }
 
 

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

* Re: [PATCH] usb.rc - fix coldplug on 2.6 (no lister defined)
@ 2004-02-22  9:59 Andrey Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Borzenkov @ 2004-02-22  9:59 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Oct 13, 2003 at 05:08:57PM -0700, Greg KH wrote:
> On Wed, Aug 06, 2003 at 11:12:26PM +0400, Andrey Borzenkov wrote:
> > On 2.6 lister is not used, but coldplug does not pass any information 
> > sufficient to find module. The patch makes it use sysfs and pass DEVPATH so 
> > usb.agent can get them from sysfs.
> 
> David, did this patch make sense to apply?
> 

Just to mention that it still is not included while it is obvious bug :)

-andrey


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2004-02-22  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-22  9:59 [PATCH] usb.rc - fix coldplug on 2.6 (no lister defined) Andrey Borzenkov
  -- strict thread matches above, loose matches on Subject: below --
2003-08-06 19:12 Andrey Borzenkov

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