* Re: [PATCH net] net: stmmac: fix ethtool flow control not able to get/set
2019-05-21 4:55 [PATCH net] net: stmmac: fix ethtool flow control not able to get/set Weifeng Voon
@ 2019-05-20 21:20 ` Andrew Lunn
2019-05-21 0:55 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-05-20 21:20 UTC (permalink / raw)
To: Weifeng Voon
Cc: David S. Miller, Maxime Coquelin, netdev, linux-kernel,
Jose Abreu, Giuseppe Cavallaro, Alexandre Torgue, Ong Boon Leong,
Tan Tee Min
On Tue, May 21, 2019 at 12:55:42PM +0800, Weifeng Voon wrote:
> From: "Tan, Tee Min" <tee.min.tan@intel.com>
>
> Currently ethtool was not able to get/set the flow control due to a
> missing "!". It will always return -EOPNOTSUPP even the device is
> flow control supported.
>
> This patch fixes the condition check for ethtool flow control get/set
> function for ETHTOOL_LINK_MODE_Asym_Pause_BIT.
>
> Fixes: 3c1bcc8614db (“net: ethernet: Convert phydev advertize and supported from u32 to link mode”)
> Signed-off-by: Tan, Tee Min <tee.min.tan@intel.com>
> Reviewed-by: Ong Boon Leong <boon.leong.ong@intel.com>
> Signed-off-by: Voon, Weifeng <weifeng.voon@intel.com@intel.com>
Upps, my bad. Sorry.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: stmmac: fix ethtool flow control not able to get/set
2019-05-21 4:55 [PATCH net] net: stmmac: fix ethtool flow control not able to get/set Weifeng Voon
2019-05-20 21:20 ` Andrew Lunn
@ 2019-05-21 0:55 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-21 0:55 UTC (permalink / raw)
To: weifeng.voon
Cc: mcoquelin.stm32, netdev, linux-kernel, joabreu, peppe.cavallaro,
alexandre.torgue, boon.leong.ong, tee.min.tan
From: Weifeng Voon <weifeng.voon@intel.com>
Date: Tue, 21 May 2019 12:55:42 +0800
> From: "Tan, Tee Min" <tee.min.tan@intel.com>
>
> Currently ethtool was not able to get/set the flow control due to a
> missing "!". It will always return -EOPNOTSUPP even the device is
> flow control supported.
>
> This patch fixes the condition check for ethtool flow control get/set
> function for ETHTOOL_LINK_MODE_Asym_Pause_BIT.
>
> Fixes: 3c1bcc8614db (“net: ethernet: Convert phydev advertize and supported from u32 to link mode”)
> Signed-off-by: Tan, Tee Min <tee.min.tan@intel.com>
> Reviewed-by: Ong Boon Leong <boon.leong.ong@intel.com>
> Signed-off-by: Voon, Weifeng <weifeng.voon@intel.com@intel.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net] net: stmmac: fix ethtool flow control not able to get/set
@ 2019-05-21 4:55 Weifeng Voon
2019-05-20 21:20 ` Andrew Lunn
2019-05-21 0:55 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Weifeng Voon @ 2019-05-21 4:55 UTC (permalink / raw)
To: David S. Miller, Maxime Coquelin
Cc: netdev, linux-kernel, Jose Abreu, Giuseppe Cavallaro,
Alexandre Torgue, Ong Boon Leong, Tan Tee Min, Weifeng Voon
From: "Tan, Tee Min" <tee.min.tan@intel.com>
Currently ethtool was not able to get/set the flow control due to a
missing "!". It will always return -EOPNOTSUPP even the device is
flow control supported.
This patch fixes the condition check for ethtool flow control get/set
function for ETHTOOL_LINK_MODE_Asym_Pause_BIT.
Fixes: 3c1bcc8614db (“net: ethernet: Convert phydev advertize and supported from u32 to link mode”)
Signed-off-by: Tan, Tee Min <tee.min.tan@intel.com>
Reviewed-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Voon, Weifeng <weifeng.voon@intel.com@intel.com>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 3c749c3..e09522c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -460,7 +460,7 @@ static void stmmac_ethtool_gregs(struct net_device *dev,
} else {
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
netdev->phydev->supported) ||
- linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+ !linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
netdev->phydev->supported))
return;
}
@@ -491,7 +491,7 @@ static void stmmac_ethtool_gregs(struct net_device *dev,
} else {
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
phy->supported) ||
- linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+ !linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
phy->supported))
return -EOPNOTSUPP;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-21 0:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21 4:55 [PATCH net] net: stmmac: fix ethtool flow control not able to get/set Weifeng Voon
2019-05-20 21:20 ` Andrew Lunn
2019-05-21 0:55 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.