On Sat, 25 Dec 2004, Laurent Riffard wrote: > Alan, congratulations on having found the source of this problem. It > was far from being obvious.
At the risk of sounding overly modest, in fact this was relatively easy to track down compared to some other bugs. Since it was clear from the source code that the warning should never occur, it wasn't a big leap to suspect something funny was happening in the compiler output. And once you've worked with devices capable of modifying I/O registers or memory values in real time, code that accesses the same location twice (with the expectation that nothing will have changed) sticks out like a sore thumb. > Please see attached listing (kernel 2.6.10-rc3-mm1 compiled with > -Os). Here is a few relevant lines (I guess) : > > 1f6a: 8b 46 04 mov 0x4(%esi),%eax > 1f6d: 89 c1 mov %eax,%ecx > 1f6f: 81 e1 00 00 f6 00 and $0xf60000,%ecx > 1f75: a9 00 00 80 00 test $0x800000,%eax > 1f7a: 0f 85 86 00 00 00 jne 2006 <uhci_result_control+0x116> This is indeed the relevant spot, and the code looks a lot better now. Thanks for your help. > I must say the badness never occured again since nov. 15th (kernel > 2.6.10-rc1-mm5). And now It will be difficult to trigger since I do > not use an USB ADSL modem anymore (I received a new _ethernet_ ADSL > modem 3 weeks ago). Maybe with my brand new USB webcam... That error is going to be pretty rare in any event, since it can happen only when the USB host controller modifies a memory value at precisely the wrong instant. But with the code fixed, now it shouldn't happen at all. This is a great example showing how leaving in an apparently useless test can nevertheless help track down a real bug. Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
