diff options
author | Shaohui Xie <Shaohui.Xie@freescale.com> | 2015-03-16 06:55:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-16 16:27:51 -0400 |
commit | 26eee0210ad72a29eb4a70b34320bda266f91a0d (patch) | |
tree | 687df8cefa73991ff81b52737aa1a7ba5ac383a8 /drivers/net/ethernet/freescale | |
parent | c243d7e20996254f89c28d4838b5feca735c030d (diff) |
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 <Shaohui.Xie@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/xgmac_mdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
79 | 79 | ||
80 | /* Wait till the MDIO write is complete */ | 80 | /* Wait till the MDIO write is complete */ |
81 | timeout = TIMEOUT; | 81 | timeout = TIMEOUT; |
82 | while ((ioread32be(®s->mdio_data) & MDIO_DATA_BSY) && timeout) { | 82 | while ((ioread32be(®s->mdio_stat) & MDIO_STAT_BSY) && timeout) { |
83 | cpu_relax(); | 83 | cpu_relax(); |
84 | timeout--; | 84 | timeout--; |
85 | } | 85 | } |