Skip to contentSkip to conversation

net/fsl: fix a bug in xgmac_mdio

PATCH Applied [email protected] 2 participants 2 messages Mar 16, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 net/fsl: fix a bug in xgmac_mdio

From: Shaohui Xie <[email protected]>

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.

---
changes for v2:
splitted from http://patchwork.ozlabs.org/patch/450392/

 drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/xgmac_mdio.c +1 -1
index 3a83bc2..5f691f2 100644
@@ -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--;
 	}
Signature · 1 line
1.8.4.1