summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2006-10-26 23:15:16 +0000
committerbrad <brad@openbsd.org>2006-10-26 23:15:16 +0000
commit29fe9b8d709a39c8466e4c8674d5c138ce69debe (patch)
treee721eed3846881ad2da57505e0cd4dc9412f3bf7
parentFix this by commiting the proper revision of the bge_encap() diff. (diff)
downloadwireguard-openbsd-29fe9b8d709a39c8466e4c8674d5c138ce69debe.tar.xz
wireguard-openbsd-29fe9b8d709a39c8466e4c8674d5c138ce69debe.zip
Set Rx early threshold and Tx DMA thesholds.
From Linux via FreeBSD
-rw-r--r--sys/dev/pci/if_stge.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index 66f18e2579b..7803bd1fd09 100644
--- a/sys/dev/pci/if_stge.c
+++ b/sys/dev/pci/if_stge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_stge.c,v 1.33 2006/10/23 02:29:20 brad Exp $ */
+/* $OpenBSD: if_stge.c,v 1.34 2006/10/26 23:15:16 brad Exp $ */
/* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */
/*-
@@ -743,8 +743,8 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFFLAGS:
if (ifp->if_flags & IFF_UP) {
if (ifp->if_flags & IFF_RUNNING &&
- ((ifp->if_flags ^ sc->stge_if_flags) &
- IFF_PROMISC)) {
+ (ifp->if_flags ^ sc->stge_if_flags) &
+ IFF_PROMISC) {
stge_set_filter(sc);
} else {
if (!(ifp->if_flags & IFF_RUNNING))
@@ -1283,6 +1283,13 @@ stge_init(struct ifnet *ifp)
CSR_WRITE_1(sc, STGE_RxDMABurstThresh, 0x30);
CSR_WRITE_1(sc, STGE_RxDMAUrgentThresh, 0x30);
+ /* Rx early threhold, from Linux */
+ CSR_WRITE_2(sc, STGE_RxEarlyThresh, 0x7ff);
+
+ /* Tx DMA thresholds, from Linux */
+ CSR_WRITE_1(sc, STGE_TxDMABurstThresh, 0x30);
+ CSR_WRITE_1(sc, STGE_TxDMAUrgentThresh, 0x04);
+
/*
* Initialize the Rx DMA interrupt control register. We
* request an interrupt after every incoming packet, but