summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2019-07-09 08:46:58 +0000
committermsaitoh <msaitoh@NetBSD.org>2019-07-09 08:46:58 +0000
commit586908d303a44bf79a844c0d489c5031debe07f0 (patch)
treea74135514c6ada04ad788fdb324c753639a2aecf /sys/dev
parent590e7bf56be8fb35c38547438d6ed4b496ade99c (diff)
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 (limited to 'sys/dev')
-rw-r--r--sys/dev/hyperv/if_hvn.c5
-rw-r--r--sys/dev/ic/i82557.c5
-rw-r--r--sys/dev/pci/if_age.c5
-rw-r--r--sys/dev/pci/if_alc.c3
-rw-r--r--sys/dev/pci/if_ale.c5
-rw-r--r--sys/dev/pci/if_bge.c5
-rw-r--r--sys/dev/pci/if_bnx.c5
-rw-r--r--sys/dev/pci/if_jme.c5
-rw-r--r--sys/dev/pci/if_nfe.c8
-rw-r--r--sys/dev/pci/if_sip.c5
-rw-r--r--sys/dev/pci/if_stge.c5
-rw-r--r--sys/dev/pci/if_ti.c5
-rw-r--r--sys/dev/pci/if_txp.c5
-rw-r--r--sys/dev/pci/if_vge.c5
-rw-r--r--sys/dev/pci/if_wm.c8
15 files changed, 48 insertions, 31 deletions
diff --git a/sys/dev/hyperv/if_hvn.c b/sys/dev/hyperv/if_hvn.c
index 92227c1fa34..be7dbe2d9fa 100644
--- a/sys/dev/hyperv/if_hvn.c
+++ b/sys/dev/hyperv/if_hvn.c
@@ -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 @@ hvn_attach(device_t parent, device_t self, void *aux)
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 --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c
index e7bfaf1aa49..d0100ae1ce2 100644
--- a/sys/dev/ic/i82557.c
+++ b/sys/dev/ic/i82557.c
@@ -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 @@ fxp_attach(struct fxp_softc *sc)
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 --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c
index ed62ec0b418..c11a2361e81 100644
--- a/sys/dev/pci/if_age.c
+++ b/sys/dev/pci/if_age.c
@@ -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 @@ age_attach(device_t parent, device_t self, void *aux)
#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 --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c
index b1a9d704b6c..5c71ea59393 100644
--- a/sys/dev/pci/if_alc.c
+++ b/sys/dev/pci/if_alc.c
@@ -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>
@@ -1441,6 +1441,7 @@ alc_attach(device_t parent, device_t self, void *aux)
#if NVLAN > 0
sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+ sc->sc_ec.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
#endif
/*
diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c
index 0fdc3881965..f279a35a72e 100644
--- a/sys/dev/pci/if_ale.c
+++ b/sys/dev/pci/if_ale.c
@@ -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>
@@ -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 @@ ale_attach(device_t parent, device_t self, void *aux)
#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 --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 39ef7e3bde9..ffcc8dcb895 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -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 @@ bge_attach(device_t parent, device_t self, void *aux)
#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 --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index c9b745e411d..ea49a98bd73 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -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 @@ bnx_attach(device_t parent, device_t self, void *aux)
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 --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c
index 2f771e54800..2b1b4c30a15 100644
--- a/sys/dev/pci/if_jme.c
+++ b/sys/dev/pci/if_jme.c
@@ -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 @@ jme_pci_attach(device_t parent, device_t self, void *aux)
*/
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 --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index edade8e9a51..461ee026654 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -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 @@ nfe_attach(device_t parent, device_t self, void *aux)
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 --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c
index f14558d48db..e2b082533c9 100644
--- a/sys/dev/pci/if_sip.c
+++ b/sys/dev/pci/if_sip.c
@@ -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 $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1266,6 +1266,7 @@ sipcom_attach(device_t parent, device_t self, void *aux)
*/
sc->sc_ethercom.ec_capabilities |=
ETHERCAP_VLAN_HWTAGGING | ETHERCAP_JUMBO_MTU;
+ sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
/*
* The DP83820 can do IPv4, TCPv4, and UDPv4 checksums
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index 57065dc43ba..7c7dfcf3f6d 100644
--- a/sys/dev/pci/if_stge.c
+++ b/sys/dev/pci/if_stge.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_stge.c,v 1.69 2019/05/28 07:41:49 msaitoh Exp $ */
+/* $NetBSD: if_stge.c,v 1.70 2019/07/09 08:46:59 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.69 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.70 2019/07/09 08:46:59 msaitoh Exp $");
#include <sys/param.h>
@@ -647,6 +647,7 @@ stge_attach(device_t parent, device_t self, void *aux)
sc->sc_ethercom.ec_capabilities |=
ETHERCAP_VLAN_MTU | /* XXX ETHERCAP_JUMBO_MTU | */
ETHERCAP_VLAN_HWTAGGING;
+ sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
/*
* We can do IPv4/TCPv4/UDPv4 checksums in hardware.
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index b01b88b5f8c..d8575cdc8be 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.111 2019/05/29 10:07:29 msaitoh Exp $ */
+/* $NetBSD: if_ti.c,v 1.112 2019/07/09 08:46:59 msaitoh Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.111 2019/05/29 10:07:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.112 2019/07/09 08:46:59 msaitoh Exp $");
#include "opt_inet.h"
@@ -1831,6 +1831,7 @@ ti_attach(device_t parent, device_t self, void *aux)
*/
sc->ethercom.ec_capabilities |=
ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+ sc->ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
/*
* We can do IPv4, TCPv4, and UDPv4 checksums in hardware.
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index 53e65e26155..b7f29bba6f5 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_txp.c,v 1.58 2019/06/20 15:25:28 msaitoh Exp $ */
+/* $NetBSD: if_txp.c,v 1.59 2019/07/09 08:46:59 msaitoh Exp $ */
/*
* Copyright (c) 2001
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.58 2019/06/20 15:25:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.59 2019/07/09 08:46:59 msaitoh Exp $");
#include "opt_inet.h"
@@ -2022,6 +2022,7 @@ txp_capabilities(struct txp_softc *sc)
sc->sc_tx_capability |= OFFLOAD_VLAN;
sc->sc_rx_capability |= OFFLOAD_VLAN;
sc->sc_arpcom.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
+ sc->sc_arpcom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
}
#if 0
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index 6924d2872f2..c956f871112 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.72 2019/05/28 07:41:49 msaitoh Exp $ */
+/* $NetBSD: if_vge.c,v 1.73 2019/07/09 08:46:59 msaitoh Exp $ */
/*-
* Copyright (c) 2004
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.72 2019/05/28 07:41:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.73 2019/07/09 08:46:59 msaitoh Exp $");
/*
* VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -980,6 +980,7 @@ vge_attach(device_t parent, device_t self, void *aux)
sc->sc_ethercom.ec_capabilities |=
ETHERCAP_VLAN_MTU | ETHERCAP_JUMBO_MTU |
ETHERCAP_VLAN_HWTAGGING;
+ sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
/*
* We can do IPv4/TCPv4/UDPv4 checksums in hardware.
diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c
index 58ff08fd302..6d24aaeddde 100644
--- a/sys/dev/pci/if_wm.c
+++ b/sys/dev/pci/if_wm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.641 2019/06/12 01:54:11 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.642 2019/07/09 08:46:59 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.641 2019/06/12 01:54:11 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.642 2019/07/09 08:46:59 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2889,9 +2889,11 @@ alloc_retry:
}
/* If we're a i82543 or greater, we can support VLANs. */
- if (sc->sc_type >= WM_T_82543)
+ if (sc->sc_type >= WM_T_82543) {
sc->sc_ethercom.ec_capabilities |=
ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
+ sc->sc_ethercom.ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
+ }
if ((sc->sc_flags & WM_F_EEE) != 0)
sc->sc_ethercom.ec_capabilities |= ETHERCAP_EEE;