[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191230.201601.251701453443736395.davem@davemloft.net>
Date: Mon, 30 Dec 2019 20:16:01 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: olteanv@...il.com
Cc: jakub.kicinski@...ronome.com, f.fainelli@...il.com,
vivien.didelot@...il.com, andrew@...n.ch, netdev@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: sja1105: Reconcile the meaning of TPID
and TPID2 for E/T and P/Q/R/S
From: Vladimir Oltean <olteanv@...il.com>
Date: Fri, 27 Dec 2019 03:11:13 +0200
> 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: f9a1a7646c0d ("net: dsa: sja1105: Reverse TPID and TPID2")
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists