Subject: Re: Snapshot 20030927 available
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Christopher SEKIYA <wileyc@rezrov.net>
List: port-sgimips
Date: 09/28/2003 21:35:29
I thought about this a little more ...

On Sun, Sep 28, 2003 at 02:40:47PM +0900, Izumi Tsutsui wrote:

> - ahc diff
>   "#if !defined(sgimips)" in MI drivers would not be acceptable.

Here is a cleaner/better way of dealing with the problem:


Index: ahc_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/ahc_pci.c,v
retrieving revision 1.43
diff -u -r1.43 ahc_pci.c
--- ahc_pci.c	2003/08/18 09:16:22	1.43
+++ ahc_pci.c	2003/09/28 12:33:44
@@ -785,6 +785,14 @@
 	const char        *intrstr;
 	struct ahc_pci_busdata *bd;
 
+#if defined(AHC_BROKEN_SEEPROM)
+	/* Some on-board implementations (notably the SGI O2)
+	   seem to have a SEEPROM but it is either filled with nonsense or
+	   imaginary.  In these cases, use the chip's defaults and avoid
+	   the BIOS. */
+	ahc->flags = AHC_USEDEFAULTS | AHC_NO_BIOS_INIT;
+#endif
+
 	ahc_set_name(ahc, ahc->sc_dev.dv_xname);
 	ahc->parent_dmat = pa->pa_dmat;
 
-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)