aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2011-09-05 09:05:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-18 04:38:59 -0400
commit41f05dedeabb0e2cb03734de383db3f0ddecf9e0 (patch)
tree9e28a190d069c765bb52135773bbf3639734180e
parentfcda37cb42cc0aa039a2d1e06ec801e4e9f417f4 (diff)
usb: ehci: remove the 1st wmb in qh_append_tds
According to ehci spec 4.10.2, Advance Queue If the fetched qTD has its Active bit set to a zero, the host controller aborts the queue advance and follows the queue head's horizontal pointer to the next schedule data structure. the 'qtd' will be linked into qh hardware queue after the line below *dummy = *qtd; is executed and observed by EHCI HC, but EHCI HC won't have chance to fetch the qtd descriptor pointed by 'qtd' in qh_append_tds until the line below dummy->hw_token = token; #set Active bit here is executed by CPU and observed by EHCI HC. There is already one 'wmb' to order writing to 'dummy'/'qtd' descriptors and writing 'token' to 'dummy' descriptor(set Active bit), so the 1st wmb is not needed and can be removed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/host/ehci-q.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index ef5925830bf1..4e4066c35a09 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -1056,7 +1056,7 @@ static struct ehci_qh *qh_append_tds (
1056 */ 1056 */
1057 token = qtd->hw_token; 1057 token = qtd->hw_token;
1058 qtd->hw_token = HALT_BIT(ehci); 1058 qtd->hw_token = HALT_BIT(ehci);
1059 wmb (); 1059
1060 dummy = qh->dummy; 1060 dummy = qh->dummy;
1061 1061
1062 dma = dummy->qtd_dma; 1062 dma = dummy->qtd_dma;