net/fsl: fix a bug in xgmac_mdio
Subsystems (2)
PATCH 1/1 net/fsl: fix a bug in xgmac_mdio
From: Shaohui Xie <[email protected]>
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 <[email protected]>
--- drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/xgmac_mdio.c +1 -1
@@ -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 (®s->mdio_stat, mdio_stat);
Signature · 1 line
1.8.4.1
From: <[email protected]>
Date: Tue, 13 Jan 2015 10:30:31 +0800
Quoted 6 lines
From: Shaohui Xie <[email protected]>
There is a bug in
xgmac_mdio_readwhen clear the bitMDIO_STAT_ENC, which '&' is missed in 'mdio_stat&= ~MDIO_STAT_ENC'.Signed-off-by Shaohui Xie <[email protected]>
Applied.