netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: am65-cpsw: rx_pause/tx_pause controls wrong direction
@ 2023-10-31 12:20 Ronald Wahl
  2023-11-04 16:10 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Ronald Wahl @ 2023-10-31 12:20 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: Grygorii Strashko, Dan Carpenter, Siddharth Vadapalli,
	Jakub Kicinski, David S . Miller, Roger Quadros, Ronald Wahl

From: Ronald Wahl <ronald.wahl@raritan.com>

The rx_pause flag says that whether we support receiving Pause frames.
When a Pause frame is received TX is delayed for some time. This is TX
flow control. In the same manner tx_pause is actually RX flow control.

Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 24120605502f..ece9f8df98ae 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1588,10 +1588,10 @@ static void am65_cpsw_nuss_mac_link_up(struct phylink_config *config, struct phy

 	/* rx_pause/tx_pause */
 	if (rx_pause)
-		mac_control |= CPSW_SL_CTL_RX_FLOW_EN;
+		mac_control |= CPSW_SL_CTL_TX_FLOW_EN;

 	if (tx_pause)
-		mac_control |= CPSW_SL_CTL_TX_FLOW_EN;
+		mac_control |= CPSW_SL_CTL_RX_FLOW_EN;

 	cpsw_sl_ctl_set(port->slave.mac_sl, mac_control);

--
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-04 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 12:20 [PATCH] net: ethernet: ti: am65-cpsw: rx_pause/tx_pause controls wrong direction Ronald Wahl
2023-11-04 16:10 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).