From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sun, 19 Jun 2005 14:46:49 +0000 Subject: Re: Input sysbsystema and hotplug Message-Id: <200506190746.49865.david-b@pacbell.net> List-Id: References: <200506131607.51736.dtor_core@ameritech.net> <200506140242.08982.dtor_core@ameritech.net> <42AE8BA4.5020702@suse.de> In-Reply-To: <42AE8BA4.5020702@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug-devel@lists.sourceforge.net Cc: Hannes Reinecke , Dmitry Torokhov , Kay Sievers , Greg KH , Vojtech Pavlik , LKML , Andrew Morton On Tuesday 14 June 2005 12:47 am, Hannes Reinecke wrote: > > Because there are _two_ events with the name 'input'. > Both run under the same name but carry different information. > One is required to load the module and the other is required to create > the device node. > > That's what I call an abomination. Or at least messy, though it's been true forever that all the event classes have included multiple events. USB hotplug has aided both "interface" and "device" driver match policies since before 2.4.0, for example. I guess "input" has seemed simpler, partially because it started later and slimmer. Maybe starting with the next kernel or so, distros should be starting to avoid these issues by converting to slim versions of the /sbin/hotplug script, handling the two steps separately. First the driver loading ... for USB, PCI/Cardbus, and PCMCIA this usually suffices: if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L $DEVPATH/driver ] then modprobe -q $MODALIAS fi Then (otherwise?) the device node creation if [ -n "$DEVPATH" ] then /sbin/udevsend $1 fi And don't have any /etc/hotplug or /etc/hotplug.d scripts. (There'd still need to be an /etc/init.d/coldplug to make up for hotplug events that preceded viable userspace.) One problem with that is that not all subsystems yet support the new $MODALIAS (and /sys/devices/.../modalias) stuff, and of course "input" is one subsystem that doesn't. That support shifts the "what module to load" logic from hotplug scripts (slow and no-longer-appropriate) over to module-init-tools (3.2 and newer for the PCMCIA support). - Dave ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&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