On Tue, 12 Apr 2005 09:50:15 -0400 (EDT) Alan Stern <[EMAIL PROTECTED]> wrote: > On Tue, 12 Apr 2005, Greg KH wrote:
> What about the question of making sure that I/O operations complete before > starting a delay loop, like this: > > outw(..., ...); > mb(); > udelay(10); > > Is the mb() sufficient to insure that the data will be written to the > device before the udelay() call begins? The mb() has nothing to do with outw() in theory, although implementations may accomplish it as a side effect. Just drop the mb(). Notice though, mb() is needed for SMP synchronization, so if you're not locking the device access with a spinlock, you'll need it still, only for unrelated reasons. For memory-mapped cycles (writew()), mb() is applicable again, but not sufficient. You need to read from the same location to flush buffering in bridges. -- Pete ------------------------------------------------------- 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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel