]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net/fsl: fix a bug in xgmac_mdio
authorShaohui Xie <Shaohui.Xie@freescale.com>
Mon, 16 Mar 2015 10:55:50 +0000 (18:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2015 20:27:51 +0000 (16:27 -0400)
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 <Shaohui.Xie@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/xgmac_mdio.c

index 3a83bc2c613ce0e907831a264070970acfd8eccf..5f691f2c166a6f9e4dccdb10fe253223540c1063 100644 (file)
@@ -79,7 +79,7 @@ static int xgmac_wait_until_done(struct device *dev,
 
        /* Wait till the MDIO write is complete */
        timeout = TIMEOUT;
-       while ((ioread32be(&regs->mdio_data) & MDIO_DATA_BSY) && timeout) {
+       while ((ioread32be(&regs->mdio_stat) & MDIO_STAT_BSY) && timeout) {
                cpu_relax();
                timeout--;
        }