From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Wed, 07 Feb 2001 09:57:52 +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 On Mittwoch, 7. Februar 2001 10:10, David Woodhouse wrote: > Oliver.Neukum@lrz.uni-muenchen.de said: > > 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. > > That can always happen; synchronous or not. User waits till the hotplug > script/daemon is just about to configure the device and viciously removes > it. Removal can happen, replacement cannot happen in the synchronous mode. Removal can be dealt with by returning EIO. > Oliver.Neukum@lrz.uni-muenchen.de said: > > You need to tell the kernel that it must cease processing events on a > > bus that you are scanning. > > You mean ignoring the 'device removed' interrupt and allowing the user to > configure the absent device just because we told them it was there? I'm not > utterly convinced by that. Again removal is not the problem, replacement is. And yes, while a configuration script is running the kernel should queue device addition events. And to be absolutely correct you need to check the queue for obsolete events before you play it to user space. > How about assigning a unique ID to each _instance_ of each device (i.e. > each time it's inserted it gets a new ID. We create a device with a name > like eth-hotplug-3452 and then tell the usermodehelper about it. The Workable approach for net devices, but why bother with a name at all ? Let's add an ioctl to name by MAC. OK a temporary name might be a good idea. > usermodehelper can do whatever it needs to do to find out which socket it's > plugged into, what its MAC address is, or whatever else it needs to decide > whether it should be eth0 or eth1, and then renames it. That works for net devices, but what about everything else ? Regards Oliver _______________________________________________ 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