From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Wed, 07 Feb 2001 21:14:18 +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 > 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. I also said (different word, true) that the names don't invalidate (hence don't get reused!) while the agents operate. There were two constraints I put in that "minimal" set; you' ve focussed on the first one! > > 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. Yet. The stack we're looking at today has two layers: bus (USB, PCI), and "next" (network). Printers and disks will be layered above busses; PCMCIA is another bus. > > > 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) I think I allowed for that already in that comment of mine you had described as "theoretical"! (I was trying to describe the practice of things in a general way ... surely that's one kind of theory. :-) By "node" presumably you mean "filesystem node"? Because I can't see the sense of a device that doesn't show up in _any_ namespace (filesystem, netdev, etc). No software could access it, right? > > > 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. Have a look at how the USB hotplug agent works; they're called independently, in that the per-device setup can get called even if the driver hasn't been loaded. - Dave _______________________________________________ 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