Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Set WMREG_KABGTXD not in wm_init_locked() but in...



details:   https://anonhg.NetBSD.org/src/rev/02381b065b14
branches:  trunk
changeset: 824809:02381b065b14
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jun 19 10:59:01 2017 +0000

description:
Set WMREG_KABGTXD not in wm_init_locked() but in wm_reset(). Same as other OSes.

diffstat:

 sys/dev/pci/if_wm.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (50 lines):

diff -r 1cbef3e9a14d -r 02381b065b14 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Jun 19 10:57:37 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Jun 19 10:59:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.509 2017/06/12 03:03:22 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.510 2017/06/19 10:59:01 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.509 2017/06/12 03:03:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.510 2017/06/19 10:59:01 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -4335,6 +4335,15 @@
                        CSR_WRITE(sc, WMREG_EIAC_82574, 0);
        }
 
+       if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
+           || (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
+           || (sc->sc_type == WM_T_PCH2) || (sc->sc_type == WM_T_PCH_LPT)
+           || (sc->sc_type == WM_T_PCH_SPT)) {
+               reg = CSR_READ(sc, WMREG_KABGTXD);
+               reg |= KABGTXD_BGSQLBIAS;
+               CSR_WRITE(sc, WMREG_KABGTXD, reg);
+       }
+
        /* reload sc_ctrl */
        sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL);
 
@@ -5363,15 +5372,6 @@
        } else
                CSR_WRITE(sc, WMREG_IMS, sc->sc_icr);
 
-       if ((sc->sc_type == WM_T_ICH8) || (sc->sc_type == WM_T_ICH9)
-           || (sc->sc_type == WM_T_ICH10) || (sc->sc_type == WM_T_PCH)
-           || (sc->sc_type == WM_T_PCH2) || (sc->sc_type == WM_T_PCH_LPT)
-           || (sc->sc_type == WM_T_PCH_SPT)) {
-               reg = CSR_READ(sc, WMREG_KABGTXD);
-               reg |= KABGTXD_BGSQLBIAS;
-               CSR_WRITE(sc, WMREG_KABGTXD, reg);
-       }
-
        /* Set up the inter-packet gap. */
        CSR_WRITE(sc, WMREG_TIPG, sc->sc_tipg);
 



Home | Main Index | Thread Index | Old Index