diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/r6040.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
214 | /* Wait for the read bit to be cleared */ | 214 | /* Wait for the read bit to be cleared */ |
215 | while (limit--) { | 215 | while (limit--) { |
216 | cmd = ioread16(ioaddr + MMDIO); | 216 | cmd = ioread16(ioaddr + MMDIO); |
217 | if (cmd & MDIO_READ) | 217 | if (!(cmd & MDIO_READ)) |
218 | break; | 218 | break; |
219 | } | 219 | } |
220 | 220 | ||
@@ -233,7 +233,7 @@ static void r6040_phy_write(void __iomem *ioaddr, int phy_addr, int reg, u16 val | |||
233 | /* Wait for the write bit to be cleared */ | 233 | /* Wait for the write bit to be cleared */ |
234 | while (limit--) { | 234 | while (limit--) { |
235 | cmd = ioread16(ioaddr + MMDIO); | 235 | cmd = ioread16(ioaddr + MMDIO); |
236 | if (cmd & MDIO_WRITE) | 236 | if (!(cmd & MDIO_WRITE)) |
237 | break; | 237 | break; |
238 | } | 238 | } |
239 | } | 239 | } |