diff options
author | marius <marius@FreeBSD.org> | 2006-10-29 20:19:41 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2006-10-29 20:19:41 +0000 |
commit | 6dee85fad4db92eae08f96b497b6c583a2bfed3c (patch) | |
tree | 163cf2eafcbffaf1c71f5ef938a3da00de579db5 /sys/pci | |
parent | 1d1d6e1a5fa703979c0b05e6db641263ad5164fc (diff) | |
download | FreeBSD-src-6dee85fad4db92eae08f96b497b6c583a2bfed3c.zip FreeBSD-src-6dee85fad4db92eae08f96b497b6c583a2bfed3c.tar.gz |
Wrap code optimized for architectures without alignment constraints
in #ifdef __NO_STRICT_ALIGNMENT rather than #if defined(__i386__) ||
defined(__amd64__). Currently this change is cosmetic only though.
While at it, fix a nearby style(9) bug and remove a no longer used
header.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_sis.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 2b67f87..8886018 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/module.h> #include <sys/socket.h> -#include <sys/sysctl.h> +#include <sys/types.h> #include <net/if.h> #include <net/if_arp.h> @@ -1398,8 +1398,8 @@ sis_newbuf(struct sis_softc *sc, struct sis_desc *c, struct mbuf *m) static void sis_rxeof(struct sis_softc *sc) { - struct mbuf *m; - struct ifnet *ifp; + struct mbuf *m, *m0; + struct ifnet *ifp; struct sis_desc *cur_rx; int total_len = 0; u_int32_t rxstat; @@ -1442,9 +1442,9 @@ sis_rxeof(struct sis_softc *sc) } /* No errors; receive the packet. */ -#if defined(__i386__) || defined(__amd64__) +#ifdef __NO_STRICT_ALIGNMENT /* - * On the x86 we do not have alignment problems, so try to + * On architectures without alignment problems we try to * allocate a new buffer for the receive ring, and pass up * the one where the packet is already, saving the expensive * copy done in m_devget(). @@ -1457,7 +1457,6 @@ sis_rxeof(struct sis_softc *sc) else #endif { - struct mbuf *m0; m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, ifp, NULL); sis_newbuf(sc, cur_rx, m); |