Skip to content

Commit

Permalink
bcm63xx_enet: timeout off by one in do_mdio_op()
Browse files Browse the repository at this point in the history
`while (limit-- >= 0)' reaches -2 after the loop upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
roel kluin authored and David S. Miller committed Oct 1, 2009
1 parent ebd6e77 commit ec1652a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bcm63xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int do_mdio_op(struct bcm_enet_priv *priv, unsigned int data)
if (enet_readl(priv, ENET_IR_REG) & ENET_IR_MII)
break;
udelay(1);
} while (limit-- >= 0);
} while (limit-- > 0);

return (limit < 0) ? 1 : 0;
}
Expand Down

0 comments on commit ec1652a

Please sign in to comment.