projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f2f6da
)
r6040: fix wrong logic in mdio code
author
Joe Chou
<
[email protected]
>
Tue, 23 Dec 2008 03:38:17 +0000
(19:38 -0800)
committer
David S. Miller
<
[email protected]
>
Tue, 23 Dec 2008 03:38:17 +0000
(19:38 -0800)
This patch fixes a reverse logic in the MDIO code.
Signed-off-by: Joe Chou <
[email protected]
>
Signed-off-by: Florian Fainelli <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/r6040.c
patch
|
blob
|
history
diff --git
a/drivers/net/r6040.c
b/drivers/net/r6040.c
index 281080d579e19c2ef0254cfba05d130da973962f..cc5e316de5719eb10570d7451ce2a2151ec7f1d0 100644
(file)
--- 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;
}
}