]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net/fsl: fix a bug in xgmac_mdio
authorShaohui Xie <Shaohui.Xie@freescale.com>
Tue, 13 Jan 2015 02:30:31 +0000 (10:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2015 21:43:29 +0000 (16:43 -0500)
There is a bug in xgmac_mdio_read when clear the bit MDIO_STAT_ENC,
which '&' is missed in 'mdio_stat &= ~MDIO_STAT_ENC'.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/xgmac_mdio.c

index e0fc3d1115ea35e31332b78da0d6b2a672df831a..a492e5006756a23f14be6897c99932a02b0857a9 100644 (file)
@@ -156,7 +156,7 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
                mdio_stat |= MDIO_STAT_ENC;
        } else {
                dev_addr = regnum & 0x1f;
-               mdio_stat = ~MDIO_STAT_ENC;
+               mdio_stat &= ~MDIO_STAT_ENC;
        }
 
        out_be32(&regs->mdio_stat, mdio_stat);