summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_port.h
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2000-11-11 16:23:31 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2000-11-11 16:23:31 +0000
commit2aa302c6f53b39e1c8597d1a9899f8954f164d87 (patch)
treee315ffc865865069d50bb4544b0d623e750655dc /sys/dev/usb/usb_port.h
parentec355f7beded997590d66cada850ebf6e678fd66 (diff)
Change the le32toh() le16toh() macros back to the previous defintion.
This change is more portable, redefine the macros to use the host letoh32/letoh16 instead of using possibly less efficient bswap routines.
Diffstat (limited to 'sys/dev/usb/usb_port.h')
-rw-r--r--sys/dev/usb/usb_port.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 9408c28e9c5..484638df9ed 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.19 2000/11/08 18:10:39 aaron Exp $ */
+/* $OpenBSD: usb_port.h,v 1.20 2000/11/11 16:23:30 drahn Exp $ */
/* $NetBSD: usb_port.h,v 1.35 2000/09/23 04:32:23 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -226,6 +226,16 @@ __CONCAT(dname,_detach)(self, flags) \
#define bswap32(x) swap32(x)
#define bswap16(x) swap16(x)
+/*
+ * The UHCI/OHCI controllers are little endian, so on big endian machines
+ * the data strored in memory needs to be swapped.
+ */
+
+#if defined(letoh32)
+#define le32toh(x) letoh32(x)
+#define le16toh(x) letoh16(x)
+#endif
+
#define usb_kthread_create1 kthread_create
#define usb_kthread_create kthread_create_deferred