Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Apply OpenBSD rev. 1.34:



details:   https://anonhg.NetBSD.org/src/rev/5c6596c22ee5
branches:  trunk
changeset: 967889:5c6596c22ee5
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Dec 26 15:26:58 2019 +0000

description:
Apply OpenBSD rev. 1.34:

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

diffstat:

 sys/dev/pci/if_stge.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r e1d175bf77a5 -r 5c6596c22ee5 sys/dev/pci/if_stge.c
--- a/sys/dev/pci/if_stge.c     Thu Dec 26 15:23:11 2019 +0000
+++ b/sys/dev/pci/if_stge.c     Thu Dec 26 15:26:58 2019 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index