From: Alexander Sverdlin cpsw_rx_vlan_encap() strips the VLAN tag of received frames and passes it as hwaccel tag, unless the host port is in the force untagged egress mask of the VLAN. In the latter case the tag is lost. In dual-MAC mode this is the case for the port VLANs, which default to VID 1 and 2 if not configured in DT. DSA tagging protocols which carry information in the VLAN tag, like LAN9303, which encodes the source port in the VID, then interpret the payload as the tag. Frames from LAN9303 port 1 are dropped with "Dropping packet due to invalid source port". Hand the frames to DSA as received if the netdev is a DSA conduit. Fixes: 4b41d3436796 ("net: ethernet: ti: cpsw: allow untagged traffic on host port") Tested-by: Lukas Stockmann Signed-off-by: Alexander Sverdlin --- drivers/net/ethernet/ti/cpsw_priv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c index 0580a7885d339..60f9db93ba735 100644 --- a/drivers/net/ethernet/ti/cpsw_priv.c +++ b/drivers/net/ethernet/ti/cpsw_priv.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -248,6 +249,10 @@ void cpsw_rx_vlan_encap(struct sk_buff *skb) /* Remove VLAN header encapsulation word */ skb_pull(skb, CPSW_RX_VLAN_ENCAP_HDR_SIZE); + /* VLAN tag may carry DSA tagging information, keep it intact */ + if (netdev_uses_dsa(skb->dev)) + return; + pkt_type = (rx_vlan_encap_hdr >> CPSW_RX_VLAN_ENCAP_HDR_PKT_TYPE_SHIFT) & CPSW_RX_VLAN_ENCAP_HDR_PKT_TYPE_MSK; -- 2.56.1