From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Fri, 09 Feb 2001 11:48:59 +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 > > a) How do you operate during system start ? > > Either assign the numbers by detection order or not at all and assume > the hotplug agent is started early from the root partition - then when > it starts, it'll see the unhandled (new) devices.. Can't do much else > anyway. By detection order, else good bye to booting from PCMCIA, firewire, FC-AL, ... > > c) How do you handle locking ? You need total mutual exclusion. > > Uh, mutual exclusion of what? I can't handle a device in the bus path > that's and one below/above it simultaneously. I can handle devices on > different branches simultaneously. It's possible that the hotplug agent > will want the same minor number for two different devices, one of these > calls will fail and will have to be retried with a different number by > the hotplug agent. You can retry, you are right. I failed to see that. But you seem to suffer from the name reuse race. reality task A task B plug in dev A bind dev A to name 0 unplug dev A unbind name 0 plug in dev B bind dev B to name 0 do something arbitrary to the dev associated with name 0 If the kernel would select name 0, it could lock on name 0. With your scheme this is hard to do. > > e) What other algorithmus that couldn't be trivially implemented in > > kernel do you want to use ? > > I want a config file, where the user can specify that: > > a) The ethercard with MAC 00:06:08:fa:9c:dd is to be registered always > as eth0 > > b) Any USB mouse that's connected to a hub connected to the first port > of the USB card in first PCI slot is to be /dev/input/mouse2 > > c) Any IDE drive with serial number 8937298A is to be /dev/hdf > > d) et similar. > > You can't do this sanely in the kernel. Nor do you absolutely need to. You can already rename network devices by ioctl. For everything else a humble symlink should do the job, shouldn't it ? Else you introduce complexity without much gain. And you need renaming in any case, as device names may have been assigned during boot. 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