Re: Multi-function PCI devices

From: Michael Reinelt (reinelt@eunet.at)
Date: Sun Apr 08 2001 - 06:38:08 EST


Jeff Garzik wrote:
>
> > Another (design) question: How will such a driver/module deal with
> > autodetection and/or devfs? I don't like to specify 'alias /dev/tts/4
> > netmos', because thats pure junk to me. What about pci hotplugging?
>
> pci hotplugging happens pretty much transparently. When a new device is
> plugged in, your pci_driver::probe routine is called. When a new device
> is removed, your pci_driver::remove routine is called.

Thats clear to me. But the probe and remove routine can only be called
if the module is already loaded. My question was: who will load the
module? (I'll call it 'netmos.o')

devfs in its standard configuration knows about loading serial.o or
parport.o when /dev/tts/* or /dev/parport/* is accessed. Some other
module loads are triggered by module dependancies (e.g. lp.o requires
parport.o)

If I do a 'modprobe serial', how should the serial driver know that the
netmos.o should be loaded, too?

There is a file called 'modules.pcimap', which contains modules for
specific PCI devices. That's how hotplugging could detect that there's a
netmos card and that netmos.o should be loaded. That looks clean to me,
but I'm not shure if this sort of PCI hotplugging is already
implemented.

bye, Michael

-- 
netWorks       	                                  Vox: +43 316  692396
Michael Reinelt                                   Fax: +43 316  692343
Geisslergasse 4					  GSM: +43 676 3079941
A-8045 Graz, Austria			      e-mail: reinelt@eunet.at
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:10 EST