* [PATCH net-next] dpaa_eth: fix pause capability advertisement logic
@ 2018-02-18 20:26 Jake Moroni
2018-02-19 16:00 ` Madalin-cristian Bucur
2018-02-19 19:06 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jake Moroni @ 2018-02-18 20:26 UTC (permalink / raw)
To: madalin.bucur; +Cc: netdev, Jake Moroni
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>
---
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
index faea674..85306d1 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);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] dpaa_eth: fix pause capability advertisement logic
2018-02-18 20:26 [PATCH net-next] dpaa_eth: fix pause capability advertisement logic Jake Moroni
@ 2018-02-19 16:00 ` Madalin-cristian Bucur
2018-02-19 19:06 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Madalin-cristian Bucur @ 2018-02-19 16:00 UTC (permalink / raw)
To: Jake Moroni; +Cc: netdev@vger.kernel.org
> -----Original Message-----
> From: Jake Moroni [mailto:mail@jakemoroni.com]
> Sent: Sunday, February 18, 2018 10:26 PM
> To: Madalin-cristian Bucur <madalin.bucur@nxp.com>
> Cc: netdev@vger.kernel.org; Jake Moroni <mail@jakemoroni.com>
> Subject: [PATCH net-next] 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.
>
> Signed-off-by: Jake Moroni <mail@jakemoroni.com>
> ---
> drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
> b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
> index faea674..85306d1 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);
> --
> 2.7.4
Acked-by: Madalin Bucur <madalin.bucur@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] dpaa_eth: fix pause capability advertisement logic
2018-02-18 20:26 [PATCH net-next] dpaa_eth: fix pause capability advertisement logic Jake Moroni
2018-02-19 16:00 ` Madalin-cristian Bucur
@ 2018-02-19 19:06 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-02-19 19:06 UTC (permalink / raw)
To: mail; +Cc: madalin.bucur, netdev
From: Jake Moroni <mail@jakemoroni.com>
Date: Sun, 18 Feb 2018 15:26:04 -0500
> 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>
Applied to net-next, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-19 19:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-18 20:26 [PATCH net-next] dpaa_eth: fix pause capability advertisement logic Jake Moroni
2018-02-19 16:00 ` Madalin-cristian Bucur
2018-02-19 19:06 ` David Miller
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).