Subject: Re: Help: NetBSD 1.1 finding NCR 53c810 twice!
To: None <curt@cynic.portal.ca, niles@axp745.gsfc.nasa.gov>
From: Ignatios Souvatzis <souva@astro.uni-bonn.de>
List: port-i386
Date: 02/13/1996 19:32:57
In article <4fllf8$dov@cynic.portal.ca> in comp.unix.bsd.netbsd.misc,
curt@cynic.portal.ca (Curt Sampson) writes:

   In article <311E147E.1C3C88B5@axp745.gsfc.nasa.gov>,
   Rick Niles  <niles@axp745.gsfc.nasa.gov> wrote:
   >I'm trying to install NetBSD 1.1 on my 486, but it seems
   >to have problems detecting my NCR 53c810.  It finds ncr0
   >and my three devices attached and then it finds ncr1 and
   >the same three devices.

   This is not a problem with the NCR chip or driver, but with the
   PCI code. I have the same problem with 1.1 on my PVI-486SP3.
   (Ironically enough, I switched from FreeBSD to NetBSD because
   FreeBSD used to have this problem but NetBSD 1.0 didn't.) What
   seems to be happening is that the driver probes devices 16-31
   on the PCI bus and these, on this particular motherboard, are
   `reflections' of 0-15.

Hm. If this is really true, this is a bug in the motherboard, not in
the PCI code. ;-) 

But then again, I browsed through the PCI code some days ago, and
noticed this:

 * On PCs, there are two methods of generating PCI configuration cycles.
 * We try to detect the appropriate mechanism for this machine and set
 * up a few function pointers to access the correct method directly.
 *
 * The configuration method can be hard-coded in the config file by
 * using `options PCI_CONF_MODE=N', where `N' is the configuration mode
 * as defined section 3.6.4.1, `Generating Configuration Cycles'.

In your particular case, the (more generic, more modern one) happens
to get recognized falsely, I guess. So you'll need to hardwire it to
2, by defining

options PCI_CONF_MODE=2

in your kernel configuration file,
config YOURKERNELFILE
cd ../compile/YOURKERNELFILE
rm pci_machdep.o
make

(If I am _very_ wrong guessing, you'll have to use options
PCI_CONF_MODE=1. :-)

   I don't know how to fix this. I sent a message to port-i386@netbsd.org
   a while back about this but got no answer. Any PCI hackers out
   there care to enlighten me about what's going on?

No PCI hacker, just read the source. ;-)

Regards,
	Ignatios