summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethoc.c
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2010-06-11 02:47:39 +0000
committerDavid S. Miller <davem@davemloft.net>2010-06-11 13:28:36 -0700
commitb46773db64c264a6600f58d9da1ae43708b47fda (patch)
tree611c2780840473ccf0dc2a5daadb7e10f0bbf075 /drivers/net/ethoc.c
parent2cbc8ef9facf60afa62e04bde91fb5fcac9a5683 (diff)
ethoc: Clear command buffer after write
This matches what ethoc_mdio_read does and makes the functions symmetric. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethoc.c')
-rw-r--r--drivers/net/ethoc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index e5c2f5b1d43..1681f081ff6 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -613,8 +613,11 @@ static int ethoc_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)
while (time_before(jiffies, timeout)) {
u32 stat = ethoc_read(priv, MIISTATUS);
- if (!(stat & MIISTATUS_BUSY))
+ if (!(stat & MIISTATUS_BUSY)) {
+ /* reset MII command register */
+ ethoc_write(priv, MIICOMMAND, 0);
return 0;
+ }
schedule();
}