summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2009-06-04 04:09:03 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2009-06-04 04:09:03 +0000
commit6a6d891cf186da9e67d82054dcdb4d945c6438da (patch)
tree9c57921d6776de0ffca880324cbdf9f338b00ae6 /sys/dev
parentf971ad1d2273319d1d78584506cf25d14c42aad1 (diff)
enable IPv6 receive TCP/UDP checksum offload for the 5755 and later chips;
from Brad
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_bge.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 0668231d164..8a55d9e9ad9 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.270 2009/06/04 00:59:21 naddy Exp $ */
+/* $OpenBSD: if_bge.c,v 1.271 2009/06/04 04:09:02 naddy Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3102,6 +3102,7 @@ bge_init(void *xsc)
struct bge_softc *sc = xsc;
struct ifnet *ifp;
u_int16_t *m;
+ u_int32_t rxmode;
int s;
s = splnet();
@@ -3187,8 +3188,13 @@ bge_init(void *xsc)
/* Turn on transmitter */
BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_ENABLE);
+ rxmode = BGE_RXMODE_ENABLE;
+
+ if (BGE_IS_5755_PLUS(sc))
+ rxmode |= BGE_RXMODE_RX_IPV6_CSUM_ENABLE;
+
/* Turn on receiver */
- BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE);
+ BGE_SETBIT(sc, BGE_RX_MODE, rxmode);
CSR_WRITE_4(sc, BGE_MAX_RX_FRAME_LOWAT, 2);