
10 Feb
2009
10 Feb
'09
9:23 p.m.
On Tuesday 10 February 2009 15:11:55 Remy Bohmer wrote:
2009/2/10 Mike Frysinger:
From: Bryan Wu bryan.wu@analog.com
int timeout = CONFIG_MUSB_TIMEOUT; while (result > 0) { csr = readw(&musbr->txcsr);
@@ -152,7 +153,17 @@ static int wait_until_ep0_ready(struct usb_device *dev, u32 bit_mask) } break; }
/* Check the timeout */
if (--timeout)
udelay(1);
Hmm, I might be mistaken, but looking at this patch you seem to want to timeout at CONFIG_MUSB_TIMEOUT, but actually the timeout ends at CONFIG_MUSB_TIMEOUT-1. Shouldn't it be: if (timeout--) instead of if (--timeout) ??? (some remark applies to all instances in this patch...)
looks that way. i was hoping for feedback about the concept from the TI guys who wrote the musb driver to see if this method is ok or they prefer something different ;). -mike