Files
linux/drivers/net
Trent Piepho baac03d9bb gianfar: Fix error in mdio reset timeout
The loop with the timeout used "while (...  && timeout--)", which means
than when the timeout occurs, "timeout" will be -1 after the loop has
exited.  The code that checks if the looped exited because of a timeout
used "if (timeout <= 0)".  Seems ok, except timeout is unsigned, and
(unsigned)-1 isn't less than zero!

Using "--timeout" in the loop fixes this problem, as now "timeout" will be
0 when the loop times out.

This also fixes a bug in the existing code, where it will erroneously think
a timeout occurred if the condition the loop was waiting for is satisfied
on the final iteration before a timeout.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24 20:48:56 -04:00
..
2008-09-18 11:34:52 -04:00
2008-09-24 18:59:02 -04:00
…
…
2008-08-27 13:56:27 -07:00
2008-09-24 18:58:59 -04:00
2008-09-24 18:48:57 -04:00
2008-09-24 18:54:42 -04:00
2008-08-07 02:22:15 -04:00
…
…
…
…
…
…
…
2008-06-10 18:20:17 -04:00
…
2008-09-03 10:24:09 -04:00
…
…
2008-08-14 04:26:38 -04:00
…
…
…
…
…
…
2008-07-18 17:54:17 -07:00
2008-05-16 22:20:27 -07:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2008-09-09 05:07:25 -07:00
2008-08-13 16:05:37 -07:00
2008-09-03 14:38:00 -07:00
2008-09-22 19:27:10 -07:00
2008-09-22 19:27:10 -07:00
2008-08-14 04:26:38 -04:00
2008-09-24 18:49:04 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-09-05 14:39:37 -07:00
2008-05-22 14:12:40 -04:00
…
…
2008-07-22 17:50:44 -04:00
2008-07-22 17:50:44 -04:00
…
…
…
…
2008-08-27 05:36:57 -04:00
2008-07-25 15:44:44 +10:00
2008-08-14 04:26:38 -04:00
2008-09-18 11:34:54 -04:00
2008-09-18 11:34:54 -04:00
…
…
2008-06-11 22:06:31 -04:00
…
…
…
…
…
…
2008-09-19 19:34:05 +02:00
…
2008-07-22 17:50:44 -04:00
…
…
…
…
…
2008-05-30 22:19:22 -04:00
…
2008-07-20 17:12:34 -07:00
2008-07-20 17:12:34 -07:00
2008-06-20 21:58:02 -07:00
…
2008-08-07 02:11:15 -04:00
…
…
…
…
2008-05-30 22:07:17 -04:00
…
…
2008-08-14 04:26:38 -04:00
2008-08-07 02:20:57 -04:00
…
…
…
2008-09-03 10:23:58 -04:00
2008-08-07 01:55:50 -04:00
…
2008-07-20 17:12:34 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2008-05-30 22:18:02 -04:00
…
…
…