summaryrefslogtreecommitdiff
path: root/sys/dev/pci/musycc.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-01-26 16:31:24 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-01-26 16:31:24 +0000
commit5bcec7ab3c66fbe81da871243c238de3b180dc52 (patch)
tree55b8f4446982ea28ea0020a57292aa3c82885699 /sys/dev/pci/musycc.c
parent83de5f427b1cb158a5c543871284e92bb7a6d80c (diff)
Some fixes to make the card work on big endian systems. Still not enough
though.
Diffstat (limited to 'sys/dev/pci/musycc.c')
-rw-r--r--sys/dev/pci/musycc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/musycc.c b/sys/dev/pci/musycc.c
index 5032cd9de7d..42ce4c145dd 100644
--- a/sys/dev/pci/musycc.c
+++ b/sys/dev/pci/musycc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc.c,v 1.12 2006/01/25 13:17:45 claudio Exp $ */
+/* $OpenBSD: musycc.c,v 1.13 2006/01/26 16:31:23 claudio Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -130,7 +130,7 @@ musycc_attach_common(struct musycc_softc *sc, u_int32_t portmap, u_int32_t mode)
mg = &sc->mc_groups[i];
mg->mg_hdlc = sc;
mg->mg_gnum = i;
- mg->mg_port = i >> (sc->mc_global_conf & 0x3);
+ mg->mg_port = i >> (portmap & MUSYCC_CONF_PORTMAP);
mg->mg_dmat = sc->mc_dmat;
if (musycc_alloc_group(mg) == -1) {
@@ -1325,7 +1325,8 @@ musycc_intr(void *arg)
n = MUSYCC_NEXTINT_GET(intstatus);
for (i = 0; i < (intstatus & MUSYCC_INTCNT_MASK); i++) {
- id = mc->mc_intrd->md_intrq[(n + i) % MUSYCC_INTLEN];
+ id = letoh32(mc->mc_intrd->md_intrq[(n + i) %
+ MUSYCC_INTLEN]);
chan = MUSYCC_INTD_CHAN(id);
mg = &mc->mc_groups[MUSYCC_INTD_GRP(id)];
@@ -1457,7 +1458,7 @@ musycc_kick(struct musycc_group *mg)
BUS_DMASYNC_PREWRITE|BUS_DMASYNC_PREREAD);
ACCOOM_PRINTF(4, ("musycc_kick: group %d sreq[%d] req %08x\n",
- mg->mg_gnum, mg->mg_sreqpend, mg->mg_sreq[mg->mg_sreqpend]));
+ mg->mg_gnum, mg->mg_sreqpend, mg->mg_sreq[mg->mg_sreqpend].sreq));
bus_space_write_4(mg->mg_hdlc->mc_st, mg->mg_hdlc->mc_sh,
MUSYCC_SERREQ(mg->mg_gnum), mg->mg_sreq[mg->mg_sreqpend].sreq);