Subject: Re: multi function PCI devices with shared registers
To: Johan Danielsson <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 03/02/1999 17:31:10
email@example.com (Johan Danielsson) writes:
> Let's say I have a PCI device with more than one function, and the
> device has some I/O map register that is shared between the two
> functions (that is the register points to the same io address).
> How can this be handled when attaching the device? I would like to get
> a pointer (or something) to the first function when attaching the
Actually, what you probably really want is to have a special driver
that attaches to 'the whole device,' and can have complete control
over all of the functions.
NetBSD's PCI code doesn't let you do that. that's a shortcoming in
the PCI code. 8-)
(There are similar cases where you want to do that for SCSI, e.g. a
driver for Central Data's SCSI terminal server boxes. There, too,
you're pretty much out of luck.)
In the short run, you're probably best going with some ad hoc gross
hack. in the long run, that (and a few other deficiencies in the PCI
code) should be addressed.
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.