1 From 8b6b208b69917d88bb3e087f8c9e61c6b05ed571 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Mon, 30 Mar 2020 14:38:50 -0700
4 Subject: [PATCH] net: dsa: bcm_sf2: Disable learning for ASP port
6 We don't want to enable learning for the ASP port since it only receives
7 directed traffic, this allows us to bypass ARL-driven forwarding rules
8 which could conflict with Broadcom tags and/or CFP forwarding.
10 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 drivers/net/dsa/bcm_sf2.c | 10 +++++++++-
14 1 file changed, 9 insertions(+), 1 deletion(-)
16 --- a/drivers/net/dsa/bcm_sf2.c
17 +++ b/drivers/net/dsa/bcm_sf2.c
18 @@ -173,9 +173,17 @@ static int bcm_sf2_port_setup(struct dsa
19 core_writel(priv, reg, CORE_MEM_PSM_VDD_CTRL);
21 /* Enable Broadcom tags for that port if requested */
22 - if (priv->brcm_tag_mask & BIT(port))
23 + if (priv->brcm_tag_mask & BIT(port)) {
24 b53_brcm_hdr_setup(ds, port);
26 + /* Disable learning on ASP port */
28 + reg = core_readl(priv, CORE_DIS_LEARN);
30 + core_writel(priv, reg, CORE_DIS_LEARN);
34 /* Configure Traffic Class to QoS mapping, allow each priority to map
35 * to a different queue number