summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy-core.c
diff options
context:
space:
mode:
authorRussell King2018-01-05 17:07:10 +0100
committerDavid S. Miller2018-01-08 20:20:21 +0100
commitf102852f980eac250855504c18f195900616deec (patch)
treeb732623e465dfbea31110fe84ebf2fcb3b73210f /drivers/net/phy/phy-core.c
parentforcedeth: remove duplicate structure member in rx (diff)
downloadkernel-qcow2-linux-f102852f980eac250855504c18f195900616deec.tar.gz
kernel-qcow2-linux-f102852f980eac250855504c18f195900616deec.tar.xz
kernel-qcow2-linux-f102852f980eac250855504c18f195900616deec.zip
net: phy: fix wrong masks to phy_modify()
The mask argument for phy_modify() in several locations was inverted. Fixes: fea23fb591cc ("net: phy: convert read-modify-write to phy_modify()") Reported-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy-core.c')
-rw-r--r--drivers/net/phy/phy-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index 44d09b192014..e75989ce8850 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -332,7 +332,7 @@ EXPORT_SYMBOL(phy_write_mmd);
* @set: bit mask of bits to set
*
* Unlocked helper function which allows a PHY register to be modified as
- * new register value = (old register value & mask) | set
+ * new register value = (old register value & ~mask) | set
*/
int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set)
{