Skip to content

Commit

Permalink
net/fsl: fix a bug in xgmac_mdio
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaohui Xie authored and David S. Miller committed Mar 16, 2015
1 parent c243d7e commit 26eee02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/xgmac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down

0 comments on commit 26eee02

Please sign in to comment.