summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-05-27 18:58:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-05-27 18:58:53 +0000
commit8084c4c5b9de95c18b2f37b49ef0ce54cb12a8d5 (patch)
tree2d7ecea99edf21d1431a97f03c2d471779179520
parent30e02f9cb4a97174715113f9656cac14ede9943e (diff)
Make sure onboard devices on Octane get their DMA byteswap settings correct.
-rw-r--r--sys/arch/sgi/xbow/xbridge.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index 8cf1ee722e4..570d11c27cf 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.21 2009/05/24 17:33:12 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.22 2009/05/27 18:58:52 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -1733,14 +1733,6 @@ xbridge_resource_setup(struct xbridge_softc *sc)
int need_setup;
struct extent *ioex;
- /*
- * On Octane, the firmware will setup the I/O registers
- * correctly for the on-board devices. Other PCI buses,
- * and other systems, need more attention.
- */
- if (sys_config.system_type == SGI_OCTANE && sc->sc_widget == WIDGET_MAX)
- return;
-
for (dev = 0; dev < BRIDGE_NSLOTS; dev++) {
id = sc->sc_devices[dev];
@@ -1758,6 +1750,15 @@ xbridge_resource_setup(struct xbridge_softc *sc)
need_setup = ((devio & BRIDGE_DEVICE_BASE_MASK) >>
(24 - BRIDGE_DEVICE_BASE_SHIFT)) != sc->sc_widget;
+ /*
+ * On Octane, the firmware will setup the I/O registers
+ * correctly for the on-board devices, except for byteswap.
+ * Other PCI buses, and other systems, need more attention.
+ */
+ if (sys_config.system_type == SGI_OCTANE &&
+ sc->sc_widget == WIDGET_MAX)
+ need_setup = 0;
+
if (need_setup) {
basewin =
(sc->sc_widget << 24) | BRIDGE_DEVIO_OFFS(dev);