Re: Multi-function PCI devices

Michael Reinelt
2001-04-07T11:34:13Z

Jeff Garzik wrote:
>
> Michael Reinelt wrote:
> > basically an extension of the pci id tables; and I hope it's in the
> > queue for the official kernel.
>
> Where is this patch available? I haven't heard of an extension to the
> pci id tables, so I wonder if it's really in the queue for the official
> kernel.

The patches went to Jens Maurer (pci_ids.h), Theodore Y. Ts'o (serial.c
and pci_ids.h) and Tim Waugh (parport_pc.c and pci_ids.h).

Well, and 'extension' may be the wrong word. I just added entries to
pci_ids.h and to the detection tables in parport_pc.c and serial.c

> > pci_announce_device() will be called only if there's no other driver
> > claiming the device. This explains why either the parallel or the serial
> > port will be detected: The first driver loaded will see the device, the
> > next drivers won't.

> There is no need to register more than one driver per PCI device -- just
> create a PCI driver whose probe routine registers serial and parallel,
> and whose remove routine unregisters same.

This means create a new module, which does the detection and uses
serial.c and parport_pc.c? I could do this (at least try to :-), but I'd
need some help here. I'm not a kernel hacker, and don't know much about
the pci code, module dependencies, driver tables, hotplugging and all
that stuff. If someone could provide a small sample (or skeleton) code
for this, I'd try my best....

On the other hand, how should the serial and parallel driver detect the
netmos card, if it's a independant module? How could this interfere with
devfs? How should devfsd know if it should load serial.o or netmos.o?

Adding PCI entries to both serial.c and parport_pc.c was that easy....

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