On Friday 30 March 2007 1:38 pm, Oliver Neukum wrote: > Am Freitag, 30. März 2007 22:04 schrieb David Brownell: > > Remember that if every completion callback does > > > > status = urb->status; > > > > at the top, the urb->status issue will by definition go away. That's > > Only if it does smp_mb(), which is the whole point of this thread.
Nope. If an smp_mb() is needed, the reason is because of other driver-internal bugs. Remember that the driver isn't allowed to so much as *LOOK* at any field of an URB until the completion callback. That generalizes: it mustn't do so until that callback (cleanly) hands the URB back to the rest of the driver. (How could you tell that the callback has been entered, before such a handoff?) Maybe in *SOME* drivers that handoff implies an smp_mb(). But as a rule, it won't ... that's a driver-specific detail. That's a very simple and straightforward policy. The only possible conflict is with the URB cancelation paths. And even there, the rule is the same ... you can (try to) cancel an URB that's been queued, but you can't look inside it until the completion callback. You assert a need for smp_mb(). That implies there is no such clean handoff to the rest of that specific driver. Which is a bug in the driver. - Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel