Thread (26 messages) 26 messages, 7 authors, 2011-08-30
STALE5389d

[PATCH] usb: ehci: fix update qtd->token in qh_append_tds

From: stern@rowland.harvard.edu (Alan Stern)
Date: 2011-08-27 20:11:11
Also in: linux-omap

On Sun, 28 Aug 2011, Ming Lei wrote:
Looks like there is still another similar problem in qh_link_async():
the last wmb
should be changed into mb, because HC will read 'head->hw->hw_next' from qh
descriptor and this pointer in qh is read only for HC. But this problem can't be
observed on ARM, since wmb on ARM is same with mb.
It doesn't matter what the HC does -- the wmb() instruction is executed
by the CPU, not the HC.  The point of that instruction is to make sure 
that the

	qh->hw->hw_next = head->hw->hw_next;

line (and all the preceding lines as well) is ordered before the

	head->hw->hw_next = dma;
3C
line.  Since both of these lines are writes, not reads, it suffices to 
use wmb() rather than mb().

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help