mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
r6040: fix wrong logic in mdio code
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>
This commit is contained in:
parent
5f2f6da76c
commit
11e5e8f5d1
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user