Source-Changes-HG archive

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

[src/netbsd-8]: src/sys Pull up the following, via patch, requested by msaito...



details:   https://anonhg.NetBSD.org/src/rev/92ec1e4730b6
branches:  netbsd-8
changeset: 852382:92ec1e4730b6
user:      martin <martin%NetBSD.org@localhost>
date:      Mon May 13 12:40:13 2019 +0000

description:
Pull up the following, via patch, requested by msaitoh in ticket #1263:

        sys/dev/mii/brgphy.c                            1.84
        sys/dev/mii/ciphy.c                             1.33 via patch
        sys/dev/mii/rgephy.c                            1.53
        sys/arch/arm/imx/if_enet.c                      1.18
        sys/arch/mips/adm5120/dev/if_admsw.c            1.19-1.20
        sys/dev/pci/if_bge.c                            1.329
        sys/dev/pci/if_bnx.c                            1.81
        sys/dev/pci/if_et.c                             1.21
        sys/dev/pci/if_lii.c                            1.22
        sys/dev/pci/if_msk.c                            1.87
        sys/dev/pci/if_nfe.c                            1.68
        sys/dev/pci/if_sk.c                             1.95
        sys/dev/pci/if_ti.c                             1.107
        sys/dev/pci/if_txp.c                            1.52
        sys/dev/pci/if_vge.c                            1.69
        sys/dev/usb/if_axen.c                           1.38
        sys/dev/usb/if_aue.c                            1.149

Fix a bug that the duplex of manual media setting may be wrong
when the IFM_GMASK bit other than IFM_[FH]DX is set.

diffstat:

 sys/arch/arm/imx/if_enet.c           |  8 ++++----
 sys/arch/mips/adm5120/dev/if_admsw.c |  8 ++++----
 sys/dev/mii/brgphy.c                 |  6 +++---
 sys/dev/mii/ciphy.c                  |  6 +++---
 sys/dev/mii/rgephy.c                 |  6 +++---
 sys/dev/pci/if_bge.c                 |  6 +++---
 sys/dev/pci/if_bnx.c                 |  6 +++---
 sys/dev/pci/if_et.c                  |  6 +++---
 sys/dev/pci/if_lii.c                 |  6 +++---
 sys/dev/pci/if_msk.c                 |  6 +++---
 sys/dev/pci/if_nfe.c                 |  6 +++---
 sys/dev/pci/if_sk.c                  |  6 +++---
 sys/dev/pci/if_ti.c                  |  8 ++++----
 sys/dev/pci/if_txp.c                 |  8 ++++----
 sys/dev/pci/if_vge.c                 |  6 +++---
 sys/dev/usb/if_aue.c                 |  6 +++---
 sys/dev/usb/if_axen.c                |  6 +++---
 17 files changed, 55 insertions(+), 55 deletions(-)

diffs (truncated from 490 to 300 lines):

diff -r 345250729414 -r 92ec1e4730b6 sys/arch/arm/imx/if_enet.c
--- a/sys/arch/arm/imx/if_enet.c        Mon May 13 09:05:33 2019 +0000
+++ b/sys/arch/arm/imx/if_enet.c        Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_enet.c,v 1.10 2016/12/15 09:28:02 ozaki-r Exp $     */
+/*     $NetBSD: if_enet.c,v 1.10.8.1 2019/05/13 12:40:13 martin Exp $  */
 
 /*
  * Copyright (c) 2014 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.10 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.10.8.1 2019/05/13 12:40:13 martin Exp $");
 
 #include "vlan.h"
 
@@ -1166,7 +1166,7 @@
                mii->mii_media_active &= ~IFM_ETH_FMASK;
        }
 
-       if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+       if ((ife->ifm_media & IFM_FDX) != 0) {
                tcr |= ENET_TCR_FDEN;   /* full duplex */
                rcr &= ~ENET_RCR_DRT;;  /* enable receive on transmit */
        } else {
@@ -1776,7 +1776,7 @@
                mii = &sc->sc_mii;
                ife = mii->mii_media.ifm_cur;
 
-               if ((ife->ifm_media & IFM_GMASK) == IFM_FDX)
+               if ((ife->ifm_media & IFM_FDX) != 0)
                        fulldup = 1;
                else
                        fulldup = 0;
diff -r 345250729414 -r 92ec1e4730b6 sys/arch/mips/adm5120/dev/if_admsw.c
--- a/sys/arch/mips/adm5120/dev/if_admsw.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/arch/mips/adm5120/dev/if_admsw.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_admsw.c,v 1.16 2016/12/15 09:28:03 ozaki-r Exp $ */
+/* $NetBSD: if_admsw.c,v 1.16.8.1 2019/05/13 12:40:13 martin Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.16 2016/12/15 09:28:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.16.8.1 2019/05/13 12:40:13 martin Exp $");
 
 
 #include <sys/param.h>
@@ -1232,12 +1232,12 @@
        if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) {
                val = PHY_CNTL2_AUTONEG|PHY_CNTL2_100M|PHY_CNTL2_FDX;
        } else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_100_TX) {
-               if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
+               if ((ifm->ifm_media & IFM_FDX) != 0)
                        val = PHY_CNTL2_100M|PHY_CNTL2_FDX;
                else
                        val = PHY_CNTL2_100M;
        } else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_10_T) {
-               if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX)
+               if ((ifm->ifm_media & IFM_FDX) != 0)
                        val = PHY_CNTL2_FDX;
                else
                        val = 0;
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/mii/brgphy.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brgphy.c,v 1.76.20.1 2019/03/07 17:22:19 martin Exp $  */
+/*     $NetBSD: brgphy.c,v 1.76.20.2 2019/05/13 12:40:13 martin Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.76.20.1 2019/03/07 17:22:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.76.20.2 2019/05/13 12:40:13 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -423,7 +423,7 @@
                        speed = BMCR_S10;
 setit:
                        brgphy_loop(sc);
-                       if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+                       if ((ife->ifm_media & IFM_FDX) != 0) {
                                speed |= BMCR_FDX;
                                gig = GTCR_ADV_1000TFDX;
                        } else
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/mii/ciphy.c
--- a/sys/dev/mii/ciphy.c       Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/mii/ciphy.c       Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.26 2016/07/07 06:55:41 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.26.10.1 2019/05/13 12:40:13 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.26.10.1 2019/05/13 12:40:13 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -197,7 +197,7 @@
                case IFM_10_T:
                        speed = CIPHY_S10;
 setit:
-                       if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+                       if ((ife->ifm_media & IFM_FDX) != 0) {
                                speed |= CIPHY_BMCR_FDX;
                                gig = CIPHY_1000CTL_AFD;
                        } else {
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/mii/rgephy.c
--- a/sys/dev/mii/rgephy.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/mii/rgephy.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rgephy.c,v 1.40.10.1 2019/01/31 05:59:55 martin Exp $  */
+/*     $NetBSD: rgephy.c,v 1.40.10.2 2019/05/13 12:40:13 martin Exp $  */
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40.10.1 2019/01/31 05:59:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40.10.2 2019/05/13 12:40:13 martin Exp $");
 
 
 /*
@@ -229,7 +229,7 @@
                        anar |= ANAR_10_FD | ANAR_10;
  setit:
                        rgephy_loop(sc);
-                       if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
+                       if ((ife->ifm_media & IFM_FDX) != 0) {
                                speed |= BMCR_FDX;
                                gig = GTCR_ADV_1000TFDX;
                                anar &= ~(ANAR_TX | ANAR_10);
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_bge.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.310.2.6 2019/04/07 13:46:39 martin Exp $  */
+/*     $NetBSD: if_bge.c,v 1.310.2.7 2019/05/13 12:40:13 martin Exp $  */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.310.2.6 2019/04/07 13:46:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.310.2.7 2019/05/13 12:40:13 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -5679,7 +5679,7 @@
                        }
                        break;
                case IFM_1000_SX:
-                       if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
+                       if ((ifm->ifm_media & IFM_FDX) != 0) {
                                BGE_CLRBIT(sc, BGE_MAC_MODE,
                                    BGE_MACMODE_HALF_DUPLEX);
                        } else {
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_bnx.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bnx.c,v 1.61.8.2 2018/05/09 14:52:40 martin Exp $   */
+/*     $NetBSD: if_bnx.c,v 1.61.8.3 2019/05/13 12:40:13 martin Exp $   */
 /*     $OpenBSD: if_bnx.c,v 1.85 2009/11/09 14:32:41 dlg Exp $ */
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.61.8.2 2018/05/09 14:52:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.61.8.3 2019/05/13 12:40:13 martin Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -1223,7 +1223,7 @@
        /* Set half or full duplex based on the duplicity
         * negotiated by the PHY.
         */
-       if ((mii->mii_media_active & IFM_GMASK) == IFM_HDX) {
+       if ((mii->mii_media_active & IFM_HDX) != 0) {
                DBPRINT(sc, BNX_INFO, "Setting Half-Duplex interface.\n");
                val |= BNX_EMAC_MODE_HALF_DUPLEX;
        } else {
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_et.c
--- a/sys/dev/pci/if_et.c       Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_et.c       Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_et.c,v 1.14.8.1 2017/08/05 04:36:56 snj Exp $       */
+/*     $NetBSD: if_et.c,v 1.14.8.2 2019/05/13 12:40:13 martin Exp $    */
 /*     $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $  */
 /*
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.14.8.1 2017/08/05 04:36:56 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.14.8.2 2019/05/13 12:40:13 martin Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -461,7 +461,7 @@
                ctrl |= ET_MAC_CTRL_MODE_MII;
        }
 
-       if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
+       if ((mii->mii_media_active & IFM_FDX) != 0)
                cfg2 |= ET_MAC_CFG2_FDX;
        else
                ctrl |= ET_MAC_CTRL_GHDX;
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_lii.c
--- a/sys/dev/pci/if_lii.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_lii.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_lii.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $      */
+/*     $NetBSD: if_lii.c,v 1.17.8.1 2019/05/13 12:40:13 martin Exp $   */
 
 /*
  *  Copyright (c) 2008 The NetBSD Foundation.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lii.c,v 1.17.8.1 2019/05/13 12:40:13 martin Exp $");
 
 
 #include <sys/param.h>
@@ -646,7 +646,7 @@
 
        val = AT_READ_4(sc, ATL2_MACC);
 
-       if ((sc->sc_mii.mii_media_active & IFM_GMASK) == IFM_FDX)
+       if ((sc->sc_mii.mii_media_active & IFM_FDX) != 0)
                val |= MACC_FDX;
        else
                val &= ~MACC_FDX;
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_msk.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.54.8.1 2018/03/08 14:31:18 martin Exp $ */
+/* $NetBSD: if_msk.c,v 1.54.8.2 2019/05/13 12:40:13 martin Exp $ */
 /*     $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.54.8.1 2018/03/08 14:31:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.54.8.2 2019/05/13 12:40:13 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -303,7 +303,7 @@
 
                /* Set duplex. */
                gpcr |= YU_GPCR_DPLX_DIS;
-               if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX)
+               if ((mii->mii_media_active & IFM_FDX) != 0)
                        gpcr |= YU_GPCR_DUPLEX;
 
                /* Disable flow control. */
diff -r 345250729414 -r 92ec1e4730b6 sys/dev/pci/if_nfe.c
--- a/sys/dev/pci/if_nfe.c      Mon May 13 09:05:33 2019 +0000
+++ b/sys/dev/pci/if_nfe.c      Mon May 13 12:40:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_nfe.c,v 1.63.8.1 2017/10/24 08:38:59 snj Exp $      */
+/*     $NetBSD: if_nfe.c,v 1.63.8.2 2019/05/13 12:40:13 martin Exp $   */
 /*     $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $        */
 
 /*-
@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.63.8.1 2017/10/24 08:38:59 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.63.8.2 2019/05/13 12:40:13 martin Exp $");



Home | Main Index | Thread Index | Old Index