summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_fxp.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>2000-06-19 00:58:34 +0000
committerdg <dg@FreeBSD.org>2000-06-19 00:58:34 +0000
commit497d79a5ee63d3d6f2904550755f1bc61d1da93a (patch)
treefff18c9b9e7f1ae1ae9c023dfac4188e5d31de4c /sys/pci/if_fxp.c
parenta275eb84ffb2ebaee95ffb6417167c75d3ccd5ca (diff)
downloadFreeBSD-src-497d79a5ee63d3d6f2904550755f1bc61d1da93a.zip
FreeBSD-src-497d79a5ee63d3d6f2904550755f1bc61d1da93a.tar.gz
Implemented some optimizations which result in 14 fewer instructions in the
receive path.
Diffstat (limited to 'sys/pci/if_fxp.c')
-rw-r--r--sys/pci/if_fxp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index d10b43a..a9060e3 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -125,11 +125,15 @@ static __inline void
fxp_lwcopy(src, dst)
volatile u_int32_t *src, *dst;
{
+#ifdef __i386__
+ *dst = *src;
+#else
volatile u_int16_t *a = (volatile u_int16_t *)src;
volatile u_int16_t *b = (volatile u_int16_t *)dst;
b[0] = a[0];
b[1] = a[1];
+#endif
}
/*
@@ -1158,7 +1162,7 @@ rcvloop:
*/
if (fxp_add_rfabuf(sc, m) == 0) {
struct ether_header *eh;
- u_int16_t total_len;
+ int total_len;
total_len = rfa->actual_size &
(MCLBYTES - 1);
@@ -1769,7 +1773,7 @@ fxp_add_rfabuf(sc, oldm)
sc->rfa_tailm->m_next = m;
v = vtophys(rfa);
fxp_lwcopy(&v, (volatile u_int32_t *) p_rfa->link_addr);
- p_rfa->rfa_control &= ~FXP_RFA_CONTROL_EL;
+ p_rfa->rfa_control = 0;
} else {
sc->rfa_headm = m;
}
OpenPOWER on IntegriCloud