Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/8cd0dc1f2c73
branches:  netbsd-8
changeset: 851156:8cd0dc1f2c73
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Nov 22 16:40:42 2017 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #379):
        sys/dev/pci/if_wm.c: revision 1.540
  On I219, drop TARC0 bit 28 for DMA hang workaround (from Linux).

diffstat:

 sys/dev/pci/if_wm.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r efeaf9bc9c2f -r 8cd0dc1f2c73 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Wed Nov 22 15:54:09 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Wed Nov 22 16:40:42 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.508.4.5 2017/11/06 09:54:01 snj Exp $      */
+/*     $NetBSD: if_wm.c,v 1.508.4.6 2017/11/22 16:40:42 martin Exp $   */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.5 2017/11/06 09:54:01 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.6 2017/11/22 16:40:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -4022,10 +4022,18 @@
                case WM_T_PCH_LPT:
                case WM_T_PCH_SPT:
                        /* TARC0 */
-                       if ((sc->sc_type == WM_T_ICH8)
-                           || (sc->sc_type == WM_T_PCH_SPT)) {
+                       if (sc->sc_type == WM_T_ICH8) {
                                /* Set TARC0 bits 29 and 28 */
                                tarc0 |= __BITS(29, 28);
+                       } else if (sc->sc_type == WM_T_PCH_SPT) {
+                               tarc0 |= __BIT(29);
+                               /*
+                                *  Drop bit 28. From Linux.
+                                * See I218/I219 spec update
+                                * "5. Buffer Overrun While the I219 is
+                                * Processing DMA Transactions"
+                                */
+                               tarc0 &= ~__BIT(28);
                        }
                        /* Set TARC0 bits 23,24,26,27 */
                        tarc0 |= __BITS(27, 26) | __BITS(24, 23);



Home | Main Index | Thread Index | Old Index