Source-Changes-HG archive

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

[src/trunk]: src/sys Don't automatically set ec_capenable's ETHERCAP_VLAN_HWT...



details:   https://anonhg.NetBSD.org/src/rev/4073ea6e2e0f
branches:  trunk
changeset: 452473:4073ea6e2e0f
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jul 09 08:46:58 2019 +0000

description:
Don't automatically set ec_capenable's ETHERCAP_VLAN_HWTAGGING bit in
vlan_config() to make it user-controllable. Instead, set the bit in
xxx_attach().

diffstat:

 sys/arch/powerpc/booke/dev/pq3etsec.c |  5 +++--
 sys/arch/x86/pci/if_vmx.c             |  8 +++++---
 sys/dev/hyperv/if_hvn.c               |  5 +++--
 sys/dev/ic/i82557.c                   |  5 +++--
 sys/dev/pci/if_age.c                  |  5 +++--
 sys/dev/pci/if_alc.c                  |  3 ++-
 sys/dev/pci/if_ale.c                  |  5 +++--
 sys/dev/pci/if_bge.c                  |  5 +++--
 sys/dev/pci/if_bnx.c                  |  5 +++--
 sys/dev/pci/if_jme.c                  |  5 +++--
 sys/dev/pci/if_nfe.c                  |  8 +++++---
 sys/dev/pci/if_sip.c                  |  5 +++--
 sys/dev/pci/if_stge.c                 |  5 +++--
 sys/dev/pci/if_ti.c                   |  5 +++--
 sys/dev/pci/if_txp.c                  |  5 +++--
 sys/dev/pci/if_vge.c                  |  5 +++--
 sys/dev/pci/if_wm.c                   |  8 +++++---
 sys/net/if_vlan.c                     |  5 ++---
 18 files changed, 58 insertions(+), 39 deletions(-)

diffs (truncated from 472 to 300 lines):

diff -r d7a0627440a1 -r 4073ea6e2e0f sys/arch/powerpc/booke/dev/pq3etsec.c
--- a/sys/arch/powerpc/booke/dev/pq3etsec.c     Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/arch/powerpc/booke/dev/pq3etsec.c     Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pq3etsec.c,v 1.45 2019/05/28 07:41:48 msaitoh Exp $    */
+/*     $NetBSD: pq3etsec.c,v 1.46 2019/07/09 08:46:58 msaitoh Exp $    */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.45 2019/05/28 07:41:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.46 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -780,6 +780,7 @@
 
        ec->ec_capabilities = ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING
            | ETHERCAP_JUMBO_MTU;
+       ec->ec_capenable = ETHERCAP_VLAN_HWTAGGING;
 
        strlcpy(ifp->if_xname, xname, IFNAMSIZ);
        ifp->if_softc = sc;
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/arch/x86/pci/if_vmx.c
--- a/sys/arch/x86/pci/if_vmx.c Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vmx.c,v 1.29 2019/05/29 10:07:29 msaitoh Exp $      */
+/*     $NetBSD: if_vmx.c,v 1.30 2019/07/09 08:46:58 msaitoh Exp $      */
 /*     $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $        */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.29 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.30 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -1721,7 +1721,9 @@
 
        sc->vmx_ethercom.ec_if.if_capabilities |= IFCAP_TSOv4 | IFCAP_TSOv6;
 
-       sc->vmx_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+       sc->vmx_ethercom.ec_capabilities |=
+           ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+       sc->vmx_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 
        IFQ_SET_MAXLEN(&ifp->if_snd, sc->vmx_ntxdescs);
        IFQ_SET_READY(&ifp->if_snd);
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/hyperv/if_hvn.c
--- a/sys/dev/hyperv/if_hvn.c   Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/hyperv/if_hvn.c   Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hvn.c,v 1.3 2019/05/29 10:07:29 msaitoh Exp $       */
+/*     $NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $       */
 /*     $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $       */
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.3 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4 2019/07/09 08:46:58 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -284,6 +284,7 @@
        if (sc->sc_proto >= HVN_NVS_PROTO_VERSION_2) {
                sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
                sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_MTU;
+               sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
        }
 
        IFQ_SET_MAXLEN(&ifp->if_snd, HVN_TX_DESC - 1);
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/ic/i82557.c       Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.153 2019/05/28 07:41:48 msaitoh Exp $     */
+/*     $NetBSD: i82557.c,v 1.154 2019/07/09 08:46:58 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.153 2019/05/28 07:41:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.154 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -392,6 +392,7 @@
                    IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_TCPv4_Rx |
                    IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_UDPv4_Rx;
                sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+               sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
        } else if (sc->sc_flags & FXPF_82559_RXCSUM) {
                ifp->if_capabilities =
                    IFCAP_CSUM_TCPv4_Rx |
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_age.c
--- a/sys/dev/pci/if_age.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_age.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_age.c,v 1.59 2019/05/28 07:41:49 msaitoh Exp $ */
+/*     $NetBSD: if_age.c,v 1.60 2019/07/09 08:46:58 msaitoh Exp $ */
 /*     $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $        */
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.59 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.60 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -262,6 +262,7 @@
 
 #if NVLAN > 0
        sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+       sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 #endif
 
        /* Set up MII bus. */
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_alc.c
--- a/sys/dev/pci/if_alc.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_alc.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_alc.c,v 1.37 2019/05/28 07:41:49 msaitoh Exp $      */
+/*     $NetBSD: if_alc.c,v 1.38 2019/07/09 08:46:58 msaitoh Exp $      */
 /*     $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $        */
 /*-
  * Copyright (c) 2009, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -1441,6 +1441,7 @@
 
 #if NVLAN > 0
        sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+       sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 #endif
 
        /*
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_ale.c
--- a/sys/dev/pci/if_ale.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_ale.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ale.c,v 1.32 2019/05/28 09:24:33 msaitoh Exp $      */
+/*     $NetBSD: if_ale.c,v 1.33 2019/07/09 08:46:59 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.32 2019/05/28 09:24:33 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.33 2019/07/09 08:46:59 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -553,6 +553,7 @@
 
 #if NVLAN > 0
        sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+       sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 #endif
 
        /* Set up MII bus. */
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_bge.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.334 2019/05/29 10:07:29 msaitoh Exp $     */
+/*     $NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.334 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.335 2019/07/09 08:46:58 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3832,6 +3832,7 @@
 #endif
        sc->ethercom.ec_capabilities |=
            ETHERCAP_VLAN_HWTAGGING | ETHERCAP_VLAN_MTU;
+       sc->ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 
        if (sc->bge_flags & BGEF_TSO)
                sc->ethercom.ec_if.if_capabilities |= IFCAP_TSOv4;
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_bnx.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bnx.c,v 1.85 2019/05/28 07:41:49 msaitoh Exp $      */
+/*     $NetBSD: if_bnx.c,v 1.86 2019/07/09 08:46:59 msaitoh Exp $      */
 /*     $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad 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.85 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.86 2019/07/09 08:46:59 msaitoh Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -863,6 +863,7 @@
 
        sc->bnx_ec.ec_capabilities |= ETHERCAP_JUMBO_MTU |
            ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+       sc->bnx_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 
        ifp->if_capabilities |=
            IFCAP_CSUM_IPv4_Tx | IFCAP_CSUM_IPv4_Rx |
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_jme.c
--- a/sys/dev/pci/if_jme.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_jme.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_jme.c,v 1.43 2019/05/28 07:41:49 msaitoh Exp $      */
+/*     $NetBSD: if_jme.c,v 1.44 2019/07/09 08:46:59 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2008 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.43 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.44 2019/07/09 08:46:59 msaitoh Exp $");
 
 
 #include <sys/param.h>
@@ -473,6 +473,7 @@
         */
        sc->jme_ec.ec_capabilities |=
            ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+       sc->jme_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
 
        if (sc->jme_flags & JME_FLAG_GIGA)
                sc->jme_ec.ec_capabilities |= ETHERCAP_JUMBO_MTU;
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_nfe.c
--- a/sys/dev/pci/if_nfe.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_nfe.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_nfe.c,v 1.70 2019/05/28 07:41:49 msaitoh Exp $      */
+/*     $NetBSD: if_nfe.c,v 1.71 2019/07/09 08:46:59 msaitoh 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.70 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.71 2019/07/09 08:46:59 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -380,9 +380,11 @@
                sc->sc_ethercom.ec_capabilities |= ETHERCAP_JUMBO_MTU;
 
 #if NVLAN > 0
-       if (sc->sc_flags & NFE_HW_VLAN)
+       if (sc->sc_flags & NFE_HW_VLAN) {
                sc->sc_ethercom.ec_capabilities |=
                        ETHERCAP_VLAN_HWTAGGING | ETHERCAP_VLAN_MTU;
+               sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
+       }
 #endif
        if (sc->sc_flags & NFE_HW_CSUM) {
                ifp->if_capabilities |=
diff -r d7a0627440a1 -r 4073ea6e2e0f sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Tue Jul 09 02:50:24 2019 +0000
+++ b/sys/dev/pci/if_sip.c      Tue Jul 09 08:46:58 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.173 2019/05/28 07:41:49 msaitoh Exp $     */
+/*     $NetBSD: if_sip.c,v 1.174 2019/07/09 08:46:59 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.173 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.174 2019/07/09 08:46:59 msaitoh Exp $");



Home | Main Index | Thread Index | Old Index