<div dir="ltr"><div><div><div><div><div><div><div><div><div>I'm seeing a problem booting from USB thumbdrives with commit ab9d771ce<br>    ehci: Update usb command timeouts to use usb_xfer_time()<br><br></div><div></div>I'm not quite sure what the problem is other than it not liking the new timeouts.<br></div><div>I couldn't see any problems with the ehci_control() calls to ehci_wait_td().<br></div><div>But the ehci_send_bulk() only allows the system to boot if I change<br>    int ret = ehci_wait_td(pipe, td, end);<br>to<br>    int ret = ehci_wait_td(pipe, td, timer_calc(5000));<br><br></div>One potential problem is that the "end" value is calculated once and reused<br></div>multiple times in the functions. Prior to the commit the timeout value was passed<br>to the ehci_wait_td() function. Now the final "end" time is passed. So it looks like<br></div>once the end timeout is reached in one of the loops that calls ehci_wait_td() the<br></div>timer will always be expired for any other calls from that function.<br><br></div>One solution might be to get rid of the "end" variable and change the calls from<br>    ret = ehci_wait_td(pipe, td, end);<br>to<br>    ret = ehci_wait_td(pipe, td, timer_calc(usb_xfer_time(p, datasize)));<br><br></div>Making the above change didn't have any impact on my booting problem until<br></div>I forced the ehci_send_bulk() timeouts to 5000.<br><br></div>Thanks in advance for any advice anyone can offer,<br>Dave<br><div><div><div><div><div><div><div><div><br></div></div></div></div></div></div></div></div></div>