From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Tue, 02 Jul 2002 02:23:10 +0000 Subject: Re: Is there any docs or design guides for adding hotplugablity to 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 Mark Atwood wrote: > Other than just reading the source, of course. Start there, and then ask questions. The docs that exist are on the http://linux-hotplug.sf.net website, and in the source code for the various subsystems that do hotplugging. Inside the kernel, one basically invokes the program identified by /proc/sys/kernel/hotplug, using a simple convention (only argv[1] is standard) with call_usermodehelper() to report those events. Normally one wants the events to be reported by some subsystem/framework code, rather than individual drivers, since it's a lose to expect every driver be changed. > I'm working on a Linux appliance, and I feel that using hotplug events > to signal things like moving in range of an 802.11 access point, > getting carrier on an ethernet port, and someone plugging a cable into > the serial port, would make a lot of stuff much much easier. > > I suspect that a lot of this would be useful out in the "regular > linux" world as well. Especially the ethernet carrier detect. (Windows > can do it, and will invoke DHCP when you plug in an ethernet cable, it > would be nice if Linux can do the same.) I agree that carrier detect would be good to report through hotplug, since that's actually the relevant event. Since the network drivers don't actually agree on an initialization model (some register before going "up", others don't -- see the special casing in the /etc/hotplug/net.agent script for a start), some of the basic issues there relate to the networking stack. Last I looked, the network stack didn't actually treat carrier detect as an interesting event, which makes such changes be unduly complex. If you're interested in updating the 2.5 stack to do such things, I'd suggest discussing this on the netdev list and shipping code before the planned feature freeze on Hallowe'en... :) - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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