提交 11e5e8f5 编写于 作者: J Joe Chou 提交者: David S. Miller

r6040: fix wrong logic in mdio code

This patch fixes a reverse logic in the MDIO code.
Signed-off-by: NJoe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5f2f6da7
......@@ -214,7 +214,7 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
/* Wait for the read bit to be cleared */
while (limit--) {
cmd = ioread16(ioaddr + MMDIO);
if (cmd & MDIO_READ)
if (!(cmd & MDIO_READ))
break;
}
......@@ -233,7 +233,7 @@ static void r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val
/* Wait for the write bit to be cleared */
while (limit--) {
cmd = ioread16(ioaddr + MMDIO);
if (cmd & MDIO_WRITE)
if (!(cmd & MDIO_WRITE))
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册