summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1997-04-14 00:45:42 +0000
committerbriggs <briggs@cvs.openbsd.org>1997-04-14 00:45:42 +0000
commite195228e3271e881db0cd984de65ac198653074c (patch)
tree5997dd5034e70da63c74e4675a39885844b51519 /sys/arch
parenta576facd20fc88b1b684a9701ad98308cab5d8b3 (diff)
Use an offset parameter when loading the reg_map--some cards use the "other"
16 bits of the words.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/dev/if_sn_nubus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/mac68k/dev/if_sn_nubus.c b/sys/arch/mac68k/dev/if_sn_nubus.c
index 6831488e29f..d495ccfacea 100644
--- a/sys/arch/mac68k/dev/if_sn_nubus.c
+++ b/sys/arch/mac68k/dev/if_sn_nubus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sn_nubus.c,v 1.8 1997/04/13 16:44:01 briggs Exp $ */
+/* $OpenBSD: if_sn_nubus.c,v 1.9 1997/04/14 00:45:41 briggs Exp $ */
/*
* Copyright (C) 1997 Allen Briggs
@@ -104,7 +104,7 @@ sn_nubus_attach(parent, self, aux)
{
struct sn_softc *sc = (void *)self;
struct nubus_attach_args *na = (struct nubus_attach_args *)aux;
- int i, success;
+ int i, success, offset;
bus_space_tag_t bst;
bus_space_handle_t bsh, tmp_bsh;
@@ -142,6 +142,7 @@ sn_nubus_attach(parent, self, aux)
sn_get_enaddr(bst, tmp_bsh, 0, sc->sc_arpcom.ac_enaddr);
+ offset = 2;
success = 1;
break;
@@ -164,6 +165,7 @@ sn_nubus_attach(parent, self, aux)
sn_get_enaddr(bst, tmp_bsh, 0, sc->sc_arpcom.ac_enaddr);
+ offset = 0;
success = 1;
break;
@@ -189,7 +191,7 @@ sn_nubus_attach(parent, self, aux)
snsetup(sc);
/* Regs are addressed as words, big endian. */
for (i = 0; i < SN_NREGS; i++) {
- sc->sc_reg_map[i] = (bus_size_t)((i * 4) + 2);
+ sc->sc_reg_map[i] = (bus_size_t)((i * 4) + offset);
}
/* snsetup returns 1 if something fails */