lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1558414542-28550-1-git-send-email-weifeng.voon@intel.com> Date: Tue, 21 May 2019 12:55:42 +0800 From: Weifeng Voon <weifeng.voon@...el.com> To: "David S. Miller" <davem@...emloft.net>, Maxime Coquelin <mcoquelin.stm32@...il.com> Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Jose Abreu <joabreu@...opsys.com>, Giuseppe Cavallaro <peppe.cavallaro@...com>, Alexandre Torgue <alexandre.torgue@...com>, Ong Boon Leong <boon.leong.ong@...el.com>, Tan Tee Min <tee.min.tan@...el.com>, Weifeng Voon <weifeng.voon@...el.com> Subject: [PATCH net] net: stmmac: fix ethtool flow control not able to get/set From: "Tan, Tee Min" <tee.min.tan@...el.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@...el.com> Reviewed-by: Ong Boon Leong <boon.leong.ong@...el.com> Signed-off-by: Voon, Weifeng <weifeng.voon@...el.com@...el.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
Powered by blists - more mailing lists