summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-05-08 18:39:02 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-05-08 18:39:02 +0000
commit3c629cfc230029bd8dca40a0d3f0c01f96f8ad68 (patch)
treefa37703aec9232aefd8e670c562219a814a80205 /sys/dev/pci
parent78eee38ce401a874ac54aca3ade4aacda8d506cd (diff)
The default initiator value is 0 on sgi IP27, IP30 and IP35 systems. Since
they don't seem to have a valid NVRAM either, override the default value.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/isp_pci.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c
index 5c74cddab84..49bb6e70348 100644
--- a/sys/dev/pci/isp_pci.c
+++ b/sys/dev/pci/isp_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_pci.c,v 1.44 2008/06/01 15:49:25 kettenis Exp $ */
+/* $OpenBSD: isp_pci.c,v 1.45 2009/05/08 18:39:01 miod Exp $ */
/*
* PCI specific probe and attach routines for QLogic ISP SCSI adapters.
*
@@ -43,6 +43,10 @@
#ifdef __sparc64__
#include <dev/ofw/openfirm.h>
#endif
+#ifdef __sgi__
+#include <machine/autoconf.h>
+#include <mips64/archtype.h>
+#endif
static u_int16_t isp_pci_rd_reg(struct ispsoftc *, int);
static void isp_pci_wr_reg(struct ispsoftc *, int, u_int16_t);
@@ -426,6 +430,18 @@ isp_pci_attach(struct device *parent, struct device *self, void *aux)
node = OF_parent(node);
}
#endif
+#ifdef __sgi__
+ /*
+ * The on-board isp controllers found on Octane, Origin 200 and
+ * Origin 300 families use id #0.
+ * XXX We'll need to be able to tell apart onboard isp from
+ * XXX other isp...
+ */
+ if (sys_config.system_type == SGI_OCTANE ||
+ sys_config.system_type == SGI_O200 ||
+ sys_config.system_type == SGI_O300)
+ DEFAULT_IID(isp) = 0;
+#endif
ioh_valid = memh_valid = 0;