mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
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>
This commit is contained in:
parent
2cbc8ef9fa
commit
b46773db64
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user