summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2002-04-07 15:41:45 +0000
committerjoe <joe@FreeBSD.org>2002-04-07 15:41:45 +0000
commit607521b72e0acd785460c82d09648e7b16d6c511 (patch)
tree78e39679d8a12b6ea906d6785fd8c600c6cc456d
parent848ccc6bb48644daa1c6dda2e5e82b248da29032 (diff)
downloadFreeBSD-src-607521b72e0acd785460c82d09648e7b16d6c511.zip
FreeBSD-src-607521b72e0acd785460c82d09648e7b16d6c511.tar.gz
Re-add the definitions of htole32(x) and le32toh(x) for OpenBSD.
-rw-r--r--sys/dev/usb/ohci.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 749f75f..1c54a4f 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -99,6 +99,20 @@ int ohcidebug = 1;
#define DPRINTFN(n,x)
#endif
+/*
+ * The OHCI controller is little endian, so on big endian machines
+ * the data strored in memory needs to be swapped.
+ */
+#if defined(__OpenBSD__)
+#if BYTE_ORDER == BIG_ENDIAN
+#define htole32(x) (bswap32(x))
+#define le32toh(x) (bswap32(x))
+#else
+#define htole32(x) (x)
+#define le32toh(x) (x)
+#endif
+#endif
+
struct ohci_pipe;
Static ohci_soft_ed_t *ohci_alloc_sed(ohci_softc_t *);
OpenPOWER on IntegriCloud