Skip to content

Commit

Permalink
r6040: fix wrong logic in mdio code
Browse files Browse the repository at this point in the history
This patch fixes a reverse logic in the MDIO code.

Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Chou authored and David S. Miller committed Dec 23, 2008
1 parent 5f2f6da commit 11e5e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
}
Expand Down

0 comments on commit 11e5e8f

Please sign in to comment.