From 11e5e8f5d14a1229706576184d2cf4c4556ed94c Mon Sep 17 00:00:00 2001 From: Joe Chou Date: Mon, 22 Dec 2008 19:38:17 -0800 Subject: r6040: fix wrong logic in mdio code This patch fixes a reverse logic in the MDIO code. Signed-off-by: Joe Chou Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- drivers/net/r6040.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/r6040.c') diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 281080d579e1..cc5e316de571 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c @@ -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; } } -- cgit v1.2.1