Skip to content

Commit

Permalink
ethoc: Clear command buffer after write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonas Bonn authored and David S. Miller committed Jun 11, 2010
1 parent 2cbc8ef commit b46773d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit b46773d

Please sign in to comment.