From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Adam J. Richter" Date: Wed, 07 Feb 2001 15:19:06 +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 >> I said, "scan the bus *after* initializing the hot plugging >> support and deal with devices that are already plugged in [...]" >> You may process a device twice this way, but user level software >> can detect this and synchronize when this is really necessary. In >> most cases, you just want to modprobe a module, which can safely be >> done multiple times, so it is not necessary to bother checking. >The problem is that may try to configure a device that's no longer there, >or worse a device that is being replaced this way. You need to tell the >kernel that it must cease processing events on a bus that you are scanning. Firstly, that would also happen if you queue the hot plugging events. Secondly, this situation is detectable by the user level initialization script failing (in the dhcp example, dhclient would get an error). It is easy enough to have the initialization script release the locking resource when that happens (in my example, by doing an "rm -rf /var/run/$netif"). Even for the more elaborate case, where, say, a user quickly inserts an ethernet card, removes it and then inserts a wireless ethernet card which might need a different initialization, my scheme would get it right because it does not look for existing devices until it has already initialized the hot plug event handling, since the only way that the first card could be detected is if the hot plugging facilties were in place in time to see its later removal and the insertion of the new card. Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us." _______________________________________________ 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