From: Shaohui Xie Date: Mon, 16 Mar 2015 10:55:50 +0000 (+0800) Subject: net/fsl: fix a bug in xgmac_mdio X-Git-Tag: v4.1-rc1~128^2~228 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=26eee0210ad72a29eb4a70b34320bda266f91a0d;p=karo-tx-linux.git net/fsl: fix a bug in xgmac_mdio There is a bug in xgmac_wait_until_done() which mdio_stat should be used instead of mdio_data when checking if busy bit is cleared. Signed-off-by: Shaohui Xie Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 3a83bc2c613c..5f691f2c166a 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -79,7 +79,7 @@ static int xgmac_wait_until_done(struct device *dev, /* Wait till the MDIO write is complete */ timeout = TIMEOUT; - while ((ioread32be(®s->mdio_data) & MDIO_DATA_BSY) && timeout) { + while ((ioread32be(®s->mdio_stat) & MDIO_STAT_BSY) && timeout) { cpu_relax(); timeout--; }