summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-10-26 23:15:17 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-10-26 23:15:17 +0000
commit1ba9d668dbb89b3d6fa405a3f3eeb5e4310ac506 (patch)
treebb830ea6e41702602659f097286d0b9488d72f45 /sys/dev/pci
parent894f958c48fa6ec5c17f1e6afe87ad157bcc49c1 (diff)
Set Rx early threshold and Tx DMA thesholds.
From Linux via FreeBSD
Diffstat (limited to 'sys/dev/pci')
-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