Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26eee021 authored by Shaohui Xie's avatar Shaohui Xie Committed by David S. Miller
Browse files

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: default avatarShaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c243d7e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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--;
	}