summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/ocelot
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-06-08 14:16:51 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-08 16:35:14 -0700
commitde274be32cb288d96b91494aeaafccc34cf4e00f (patch)
treeba2f09cb1ded13f42613444d3a3a9287ccefdc01 /drivers/net/dsa/ocelot
parent96bffe70231c871d1b39ecc44288c96bed66422b (diff)
downloadlinux-stable-de274be32cb288d96b91494aeaafccc34cf4e00f.tar.gz
linux-stable-de274be32cb288d96b91494aeaafccc34cf4e00f.tar.bz2
linux-stable-de274be32cb288d96b91494aeaafccc34cf4e00f.zip
net: dsa: felix: set TX flow control according to the phylink_mac_link_up resolution
Instead of relying on the static initialization done by ocelot_init_port() which enables flow control unconditionally, set SYS_PAUSE_CFG_PAUSE_ENA according to the parameters negotiated by the PHY. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot')
-rw-r--r--drivers/net/dsa/ocelot/felix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index ce607fbaaa3a..a2a15919b960 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -940,6 +940,8 @@ static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port,
ocelot_write_rix(ocelot, 0, ANA_POL_FLOWC, port);
+ ocelot_fields_write(ocelot, port, SYS_PAUSE_CFG_PAUSE_ENA, tx_pause);
+
/* Undo the effects of felix_phylink_mac_link_down:
* enable MAC module
*/