Module Name:    src
Committed By:   msaitoh
Date:           Thu Dec 26 15:26:58 UTC 2019

Modified Files:
        src/sys/dev/pci: if_stge.c

Log Message:
Apply OpenBSD rev. 1.34:

 > Set Rx early threshold and Tx DMA thesholds.
 >
 > From Linux via FreeBSD


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_stge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_stge.c
diff -u src/sys/dev/pci/if_stge.c:1.73 src/sys/dev/pci/if_stge.c:1.74
--- src/sys/dev/pci/if_stge.c:1.73	Sun Nov 10 13:34:52 2019
+++ src/sys/dev/pci/if_stge.c	Thu Dec 26 15:26:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_stge.c,v 1.73 2019/11/10 13:34:52 msaitoh Exp $	*/
+/*	$NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.73 2019/11/10 13:34:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $");
 
 
 #include <sys/param.h>
@@ -1464,6 +1464,13 @@ stge_init(struct ifnet *ifp)
 	bus_space_write_1(st, sh, STGE_RxDMABurstThresh, 0x30);
 	bus_space_write_1(st, sh, STGE_RxDMAUrgentThresh, 0x30);
 
+	/* Rx early threhold, from Linux */
+	bus_space_write_2(st, sh, STGE_RxEarlyThresh, 0x7ff);
+
+	/* Tx DMA thresholds, from Linux */
+	bus_space_write_1(st, sh, STGE_TxDMABurstThresh, 0x30);
+	bus_space_write_1(st, sh, STGE_TxDMAUrgentThresh, 0x04);
+
 	/*
 	 * Initialize the Rx DMA interrupt control register.  We
 	 * request an interrupt after every incoming packet, but

Reply via email to