summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-01-25 04:25:22 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-01-25 04:25:22 +0000
commit92a320bf4933a62d32c2192e90d1116930bc0aef (patch)
treefad5ca4fcfece4e3feee1593cf050c750ee29a4f /sys
parentad65a352b6fa153545ea1021927e6e476b74fb8a (diff)
the event type is a 16bit value, not 32bit. use htole16 instead of htole32.
mpii(4) works on sparc64 with this.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/mpii.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index ba3bee374da..916a9be1c7a 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.68 2012/09/28 12:46:41 mikeb Exp $ */
+/* $OpenBSD: mpii.c,v 1.69 2013/01/25 04:25:21 dlg Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -1753,9 +1753,9 @@ mpii_event_process(struct mpii_softc *sc, struct mpii_rcb *rcb)
enp = (struct mpii_msg_event_reply *)rcb->rcb_reply;
DNPRINTF(MPII_D_EVT, "%s: mpii_event_process: %#x\n", DEVNAME(sc),
- letoh32(enp->event));
+ letoh16(enp->event));
- switch (letoh32(enp->event)) {
+ switch (letoh16(enp->event)) {
case MPII_EVENT_EVENT_CHANGE:
/* should be properly ignored */
break;
@@ -1828,7 +1828,7 @@ mpii_event_process(struct mpii_softc *sc, struct mpii_rcb *rcb)
}
default:
DNPRINTF(MPII_D_EVT, "%s: unhandled event 0x%02x\n",
- DEVNAME(sc), letoh32(enp->event));
+ DEVNAME(sc), letoh16(enp->event));
}
if (enp->ack_required) {