net: mscc: ocelot: disable flow control on NPI interface
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 13 Jul 2020 16:57:06 +0000 (19:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 00:40:02 +0000 (17:40 -0700)
The Ocelot switches do not support flow control on Ethernet interfaces
where a DSA tag must be added. If pause frames are enabled, they will be
encapsulated in the DSA tag just like regular frames, and the DSA master
will not recognize them.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c

index aca805b9c0b33214532f10dd47377fc78b9d4c86..2a44305912d2fc00c2267faaea1fdc5e177b7dcd 100644 (file)
@@ -1401,6 +1401,10 @@ void ocelot_configure_cpu(struct ocelot *ocelot, int npi,
                                    extraction);
                ocelot_fields_write(ocelot, npi, SYS_PORT_MODE_INCL_INJ_HDR,
                                    injection);
+
+               /* Disable transmission of pause frames */
+               ocelot_rmw_rix(ocelot, 0, SYS_PAUSE_CFG_PAUSE_ENA,
+                              SYS_PAUSE_CFG, npi);
        }
 
        /* Enable CPU port module */