From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Wed, 07 Feb 2001 21:02:02 +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 > > These are not enough. You must ensure that "remove" has finished before > > you start anything that reuses the device node. > > I was assuming something that I suspect we should be considering > as a goal (an "architectural" one?): names passed by hotplug agents > must be stable. Good idea. > I'll have to think more about Vojtech's comments. I think I will > likely want the kernel to guarantee some stable name (is that a > place where devfs could really help?) and let all the mappings > to "virtual" names (like "eth0") be managed separately. For SCSI devfs does that. About other subsystems I don't know enough. But stable names don't save you from a need to serialise due to reuse. In fact a stable name implies reuse, as it depends on bus location. Either you get unique or you get stable names. > > You see, changing the order of events 2 and 3 is wrong. > > You'd have the wrong interfaces in printcap. > > Couldn't matter if the agent were passing the right stable names > though, right? Right, except for true reuse. See above. > > Then you'd need to have a stable name provided to the hotplug script. > > Yes ... > > > This is difficult, for several reasons. > > a) You need devfs (which is not PC) > > "devfsd" is not PC for me, but I'm less clear why a "/devfs" wouldn't be > fine. Anyone care to start a separate thread on such topics? > > > b) You know that name only after the driver is loaded. (You don't even > > know the number of names, multifunction devices and bridges) > > Device drivers can be viewed as adapters between namespaces: > loading a device driver may cause entries in other namespaces. This is the most theoretical way I have ever heard device drivers described :-) > USB device "/proc/bus/usb/002/031" may be network interface "usb0". > The lower level name (USB) is known before "usbnet" is loaded, > but "usb0" isn't known till afterwards ... but then, USB hotplugging > sees the USB name, and network hotplugging is what sees "usb0". True, but there's no equivalent for network hotplugging for other subsystems. > > c) You'd need to call after drivers have bound to interfaces. > > USB hotplug is called after the kernel gives drivers a chance to > bind to interfaces. That's not enough. The mapping between devices and nodes isn't 1:1 but 1:0-n You need an agent run for every node and an agent for the device (to load the driver) > > These are conflicting requirements. In fact you'd need _two_ scripts. One > > to load the driver, a second to configure the device the driver has bound > > to. > > You mean like the difference between /etc/hotplug/*.agent (load driver FOO) > and /etc/hotplug/*/FOO (configure each new device)? :-) I am not sure. I think you need to call them independently. 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