On Wed, Nov 20, 2002 at 09:24:36AM -0800, Ravi wrote: > > --- Greg KH <greg@kroah.com> wrote: > > On Tue, Nov 19, 2002 at 09:47:49AM -0800, Ravi wrote: > > > > I have a very simple question . How does > > > > Linux know that it has to load driver 'x' for > > > > device 'y'. > > > > > > It doesn't :) > > > > Um, yes, it can know this :) > > > > See the hotplug documentation at http://linux-hotplug.sf.net/ > > which shows how the kernel can automatically load modules > > when it sees devices of different types. The PCI, USB, > > and a few other subsystems already do this. > > Even with hotplug, the kernel doesn't know which > driver to load, isn't that right? From what I understand, > the hotplug user mode agents have to be configured to > pick the right driver for a given card (based on the > information given by the kernel). > What I tried to say in my earlier mail was: Kernel > can't pick the driver for a given device. Instead, > it associates devices with drivers when a driver > is loaded. Is that statement correct? Yes, that is correct. But I was trying to point out that the kernel drivers (which are part of the kernel) know what devices they support. And the kernel knows what devices it sees on a specific bus (PCI, USB, etc.) So it's up to /sbin/hotplug to put the two together automatically. Hope this helps, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/