From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brad Hards Date: Tue, 02 Jul 2002 03:37:36 +0000 Subject: Re: Is there any docs or design guides for adding hotplugablity to drivers? 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 On Tue, 2 Jul 2002 12:32, Chris Hanson wrote: > Date: 01 Jul 2002 14:00:19 -0700 > From: Mark Atwood > > Other than just reading the source, of course. > > 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'm working on this. I've already implemented code to do carrier > detect, although this only works on NICs that support MII. > (Unfortunately the Lucent Prism II doesn't support MII; if anyone > knows how to do carrier detect on non-MII NICs, I'd appreciate > learning how.) See the Debian package "laptop-net" for details: The concept of carrier detect is a bit marginal on a non-wired links. Normally you need to associate to be considered on the link. Note that most newish network cards do support carrier detect in some form. We even support it for most of the USB networking devices. You can see this using a proggie like ethtool (http://www.sf.net/projects/gkernel). The way it works is that the driver does whatever magic it needs, and then signals to the networking stack using netif_carrier_on() and netif_carrier_off. The trivial solution is to add a call_usermodehelper() to the netif_carrier_[off,on] routines (in . Unfortunately the call_usermodehelper() needs process context, and you can't assume that for the netif_carrier_[on|off] calls. Brad -- http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black. ------------------------------------------------------- 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