diff options
author | tmm <tmm@FreeBSD.org> | 2002-02-27 17:16:18 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2002-02-27 17:16:18 +0000 |
commit | 3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a (patch) | |
tree | 46353f300fd15b6b132ccde617d8726a2e38d224 /sys/dev/usb/uhci.c | |
parent | e9d577adb2ffdd3b7300415775c1212a087ce0dc (diff) | |
download | FreeBSD-src-3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a.zip FreeBSD-src-3ed05b7b8966710c5cffbf0ba479dd2e07c91c0a.tar.gz |
Add the following functions/macros to support byte order conversions and
device drivers for bus system with other endinesses than the CPU (using
interfaces compatible to NetBSD):
- bwap16() and bswap32(). These have optimized implementations on some
architectures; for those that don't, there exist generic implementations.
- macros to convert from a certain byte order to host byte order and vice
versa, using a naming scheme like le16toh(), htole16().
These are implemented using the bswap functions.
- stream bus space access functions, which do not perform a byte order
conversion (while the normal access functions would if the bus endianess
differs from the CPU endianess).
htons(), htonl(), ntohs() and ntohl() are implemented using the new
functions above for kernel usage. None of the above interfaces is currently
exported to user land.
Make use of the new functions in a few places where local implementations
of the same functionality existed.
Reviewed by: mike, bde
Tested on alpha by: mike
Diffstat (limited to 'sys/dev/usb/uhci.c')
-rw-r--r-- | sys/dev/usb/uhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index de4e64f..d01c131 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -112,7 +112,7 @@ int uhcinoloop = 0; * The UHCI controller is little endian, so on big endian machines * the data strored in memory needs to be swapped. */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__OpenBSD__) #if BYTE_ORDER == BIG_ENDIAN #define htole32(x) (bswap32(x)) #define le32toh(x) (bswap32(x)) |