Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b46773db authored by Jonas Bonn's avatar Jonas Bonn Committed by David S. Miller
Browse files

ethoc: Clear command buffer after write



This matches what ethoc_mdio_read does and makes the functions
symmetric.

Signed-off-by: default avatarJonas Bonn <jonas@southpole.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2cbc8ef9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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();
	}