Skip to contentSkip to conversation

net: dsa: felix: set TX flow control according to the phylink_mac_link_up resolution

PATCH Applied Vladimir Oltean 2 participants 2 messages Jun 8, 2021

Subsystems (4)
lore
Share & tools
lore

Vladimir Oltean

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: felix: set TX flow control according to the phylink_mac_link_up resolution

From: Vladimir Oltean <[email protected]>

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.

---
 drivers/net/dsa/ocelot/felix.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/dsa/ocelot/felix.c +2 -0
index ce607fbaaa3a..a2a15919b960 100644
@@ -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
 	 */
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Tue, 8 Jun 2021 14:16:51 +0300 you wrote:

From: Vladimir Oltean <[email protected]>

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.

[...]

Here is the summary with links:
- [net-next] net: dsa: felix: set TX flow control according to the phylink_mac_link_up resolution

    https://git.kernel.org/netdev/net-next/c/de274be32cb2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html