dpaa_eth: fix pause capability advertisement logic
Subsystems (3)
PATCH 1/1 dpaa_eth: fix pause capability advertisement logic
The ADVERTISED_Asym_Pause bit was being improperly set when both rx and tx pause were enabled. When rx and tx are both enabled, only the ADVERTISED_Pause bit is supposed to be set.
--- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +1 -1
@@ -211,7 +211,7 @@ static int dpaa_set_pauseparam(struct net_device *net_dev,if (epause->rx_pause) newadv = ADVERTISED_Pause | ADVERTISED_Asym_Pause;if (epause->tx_pause) - newadv |= ADVERTISED_Asym_Pause; + newadv ^= ADVERTISED_Asym_Pause; oldadv = phydev->advertising & (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
Signature · 1 line
2.7.4
Quoted 31 lines
-----Original Message-----
From: Jake Moroni [mailto:[email protected]]
Sent: Sunday, February 18, 2018 10:26 PM
To: Madalin-cristian Bucur <[email protected]>
Cc: [email protected]; Jake Moroni <[email protected]>
Subject: [PATCH net-next]dpaa_eth: fix pause capability advertisement logicThe
ADVERTISED_Asym_Pausebit was being improperly set when both rx and tx pause were enabled. When rx and tx are both enabled, only theADVERTISED_Pausebit is supposed to be set.Signed-off-by Jake Moroni <[email protected]>--- drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c +1
-1@@ -211,7 +211,7 @@ static int dpaa_set_pauseparam(struct net_device *net_dev, if (epause->rx_pause) newadv = ADVERTISED_Pause | ADVERTISED_Asym_Pause;if (epause->tx_pause) - newadv |= ADVERTISED_Asym_Pause; + newadv ^= ADVERTISED_Asym_Pause; oldadv = phydev->advertising &
Quoted 3 lines
(
ADVERTISED_Pause|ADVERTISED_Asym_Pause);
--
2.7.4
From: Jake Moroni <[email protected]>
Date: Sun, 18 Feb 2018 15:26:04 -0500
Quoted 5 lines
The
ADVERTISED_Asym_Pausebit was being improperly set when both rx and tx pause were enabled. When rx and tx are both enabled, only theADVERTISED_Pausebit is supposed to be set.Signed-off-by Jake Moroni <[email protected]>
Applied to net-next, thank you.