Re: [PATCH]generic usb serial driver

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Samstag, 31. März 2007 04:59 schrieb Alan Stern:
> isn't clean -- but several drivers do it this way.  I'm not even certain 
> that adding smp_mb() to the completion routine will really fix it; memory 
> barriers have to be used in pairs, and so there would also need to be a 
> barrier between the test of private_data->urb_done and the call to 
> use(urb).
> 

In the example you have given smp_rmb() would be required.
However we have:

CPU A				CPU B
a = urb->status			if (flag)
flag = 1					urb->status = x

abstractly speaking. CPU A needs a memory barrier.

Are you saying that CPUs may do speculative _writes_ ?

	Regards
		Oliver

-------------------------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.