From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Tue, 06 Feb 2001 01:10:09 +0000 Subject: Re: Adding PCMCIA support to the kernel tree -- developers needed. Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Oliver responding to David W: > > Have we considered the possibility that the kernel thread spawned by > > exec_usermodehelper could sleep on a wait queue if invoked too early in > > the boot sequence, and the kernel could call wake_up() on that wait queue > > after the root filesystem is mounted? That way, we can just forget about > > this special case. I think that got batted around (I certainly thought about it) but it doesn't offer a way to guarantee some behaviors that I think are important. (Ones that the test12 patch, turning everything async, removed ... though the comments in 'usb.c' aren't updated.) Serializing the order for event reports is a concern: don't report unplugs before you report the plug-in of that device, keep the device identifiers stable. For example, I know that some folk have been using hotplugging in setting security policies for the /proc/bus/usb/MMM/NNN device files (used in user mode driver APIs). To do that reliably, you must know that the name passed through /sbin/hotplug (DEVICE variable in the environment) is still going to point to the right device when the per-device setup scripts run ... rather than pointing to some different device. "usbdevfs" is optional so that issue doesn't show up in Linus' default kernel configuration, but that type of problem should have a good solution. > > Or is that still too early in the boot sequence? Do we need to wait for > > other filesystems to be mounted? > > Most certainly yes. You need proc and usbdevfs. Design goal of USB hotplugging: don't _require_ usbdevfs in for most current devices. It doesn't, but "usbmodules" does. Maybe the next iteration of hotplug should do differently. Of course, "hot" plugging is not the same thing as being present at boot time ... I think of these two as separate technical problems, which happen to need a common subroutine ("/sbin/hotplug usb" being the current implementation). > usr or devfs are conceivable, too. Even var might be needed. Right now the /etc/init.d/hotplug script runs as part of the normal setup sequence, with all those accessible. The "boot time events" are all lost unless they can be inferred from "usbdevfs" or (for PCI) "procfs". > If you wish to wait, why not wait for activation by sysctl ? That is, sysctl to set the kernel "hotplug" string? Would that then invoke "/sbin/hotplug start", or would something else need to make sure all the relevant subsystems are well enough initialized? - Dave _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel