linux/drivers/net/dsa
Vladimir Oltean 54fa49ee88 net: dsa: sja1105: Reconcile the meaning of TPID and TPID2 for E/T and P/Q/R/S
For first-generation switches (SJA1105E and SJA1105T):
- TPID means C-Tag (typically 0x8100)
- TPID2 means S-Tag (typically 0x88A8)

While for the second generation switches (SJA1105P, SJA1105Q, SJA1105R,
SJA1105S) it is the other way around:
- TPID means S-Tag (typically 0x88A8)
- TPID2 means C-Tag (typically 0x8100)

In other words, E/T tags untagged traffic with TPID, and P/Q/R/S with
TPID2.

So the patch mentioned below fixed VLAN filtering for P/Q/R/S, but broke
it for E/T.

We strive for a common code path for all switches in the family, so just
lie in the static config packing functions that TPID and TPID2 are at
swapped bit offsets than they actually are, for P/Q/R/S. This will make
both switches understand TPID to be ETH_P_8021Q and TPID2 to be
ETH_P_8021AD. The meaning from the original E/T was chosen over P/Q/R/S
because E/T is actually the one with public documentation available
(UM10944.pdf).

Fixes: f9a1a7646c ("net: dsa: sja1105: Reverse TPID and TPID2")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-30 20:15:02 -08:00
..
b53 net: dsa: b53: Fix egress flooding settings 2019-12-16 16:08:09 -08:00
microchip net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
mv88e6xxx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
ocelot net: dsa: ocelot: add NET_VENDOR_MICROSEMI dependency 2019-12-16 19:24:26 -08:00
sja1105 net: dsa: sja1105: Reconcile the meaning of TPID and TPID2 for E/T and P/Q/R/S 2019-12-30 20:15:02 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: Fix IP fragment location and behavior 2019-12-24 16:08:49 -08:00
bcm_sf2_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
bcm_sf2.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-09 11:04:37 -08:00
bcm_sf2.h net: dsa: bcm_sf2: Add support for optional reset controller line 2019-11-05 18:06:38 -08:00
dsa_loop_bdinfo.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
dsa_loop.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig net: dsa: ocelot: add driver for Felix switch family 2019-11-15 12:32:16 -08:00
lan9303_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lan9303_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lan9303-core.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
lan9303.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
lantiq_gswip.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: ocelot: add driver for Felix switch family 2019-11-15 12:32:16 -08:00
mt7530.c net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
mt7530.h net: dsa: mt7530: Add support for port 5 2019-09-05 00:28:23 +02:00
mv88e6060.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
qca8k.c net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
qca8k.h net: dsa: qca8k: introduce reset via gpio feature 2019-06-27 11:17:30 -07:00
realtek-smi-core.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
realtek-smi-core.h net: dsa: fix warning same module names 2019-06-14 19:28:54 -07:00
rtl8366.c net: dsa: rtl8366: Check VLAN ID and not ports 2019-10-02 12:09:23 -04:00
rtl8366rb.c net: dsa: rtl8366rb: add missing of_node_put after calling of_get_child_by_name 2019-10-01 10:02:56 -07:00
vitesse-vsc73xx-core.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
vitesse-vsc73xx-platform.c net: dsa: vsc73xx: add support for parallel mode 2019-07-07 14:16:32 -07:00
vitesse-vsc73xx-spi.c net: dsa: vsc73xx: Split vsc73xx driver 2019-07-07 14:16:32 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: Split vsc73xx driver 2019-07-07 14:16:32 -07:00