summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2012-08-11 00:57:02 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2012-08-11 00:57:02 +0000
commit7363400f3a40fe20876e97b7a61b5c092eec4418 (patch)
treeea5c48f90f8a6ffb1c8d076920ac601b875373f6 /sys
parentfe6f2ef5cec55aeaa5a898c35090555c180efc90 (diff)
the producer/consumer values are used by the device, which is little
endian. do appropriate byteswapping for when the host cpu uses them. tested on a perc5 (xscale) in an amd64.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/mfi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 95c00472604..15e95b35a45 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.122 2012/01/12 06:12:30 dlg Exp $ */
+/* $OpenBSD: mfi.c,v 1.123 2012/08/11 00:57:01 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -853,8 +853,8 @@ mfi_intr(void *arg)
return (0);
pcq = MFIMEM_KVA(sc->sc_pcq);
- producer = pcq->mpc_producer;
- consumer = pcq->mpc_consumer;
+ producer = letoh32(pcq->mpc_producer);
+ consumer = letoh32(pcq->mpc_consumer);
DNPRINTF(MFI_D_INTR, "%s: mfi_intr %#x %#x\n", DEVNAME(sc), sc, pcq);
@@ -881,7 +881,7 @@ mfi_intr(void *arg)
consumer = 0;
}
- pcq->mpc_consumer = consumer;
+ pcq->mpc_consumer = htole32(consumer);
return (claimed);
}