summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Moroni <mail@jakemoroni.com>2018-02-18 15:26:04 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:52:39 +0200
commitf0cf2575cd478bb6b1230db1bba9978927116491 (patch)
treefeb730dba5450de774a1379b359d94b4491d34bb
parent80300e879f9efaf723e7ef07a013271a8933f5f9 (diff)
downloadlinux-f0cf2575cd478bb6b1230db1bba9978927116491.tar.gz
linux-f0cf2575cd478bb6b1230db1bba9978927116491.tar.bz2
linux-f0cf2575cd478bb6b1230db1bba9978927116491.zip
dpaa_eth: fix pause capability advertisement logic
[ Upstream commit 3021efb440d02bf5b952b6d151c7ffee9bdd49fe ] 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. Signed-off-by: Jake Moroni <mail@jakemoroni.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
index faea674094b9..85306d1b2acf 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
@@ -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);