Re: Multi-function PCI devices

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 07 Apr 2001 14:44:14 -0400


Michael Reinelt wrote:
> But what I want to know before I spend time (and not-earning-money :-)
> into this, I want to know: Is this the right way (TM)? How do other
> multiport cards deal with this issue?
>
> This is a specific question to the serial and parallel maintainers: are
> there cards supported by _both_ the serial and parallel subsystem? Do
> they work with 2.4.3? Will they work in the future? (I'm too lazy to
> compare the PCI tables from serial and parallel ;-)

FWIW Tim (in this thread) is the parallel maintainer, tytso is the
serial maintainer. WRT serial, there exists serial_cs driver, and the
serial_cb driver -used- to exist. The entire purpose of these "shim"
drivers was to probe their [pcmcia, CardBus] busses for the necessary
information, and then call the existing serial layer to register ports
using the probe information already discovered. I think the pcmcia-cs
package has a similar plug-n-play shim driver for parallel ports.

To answer your question, if there are such multifunctions cards working
in 2.4.3, then their drivers are either (a) ignoring one or more
functions in favor of a primary function, or (b) lucky enough to have
hardware which export multiple PCI bus entries, one for each logical
function, making it easy to modify the subsystem driver itself to probe
for the hardware.

> 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.

Jeff

-- 
Jeff Garzik       | Sam: "Mind if I drive?"
Building 1024     | Max: "Not if you don't mind me clawing at the dash
MandrakeSoft      |       and shrieking like a cheerleader."
-
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/