]> git.baikalelectronics.ru Git - kernel.git/commit
usb: ehci: remove the 1st wmb in qh_append_tds
authorMing Lei <tom.leiming@gmail.com>
Mon, 5 Sep 2011 13:05:58 +0000 (21:05 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 18 Sep 2011 08:38:59 +0000 (01:38 -0700)
commitcacef41cfbf55343d331733b1c3759b9b8c38752
tree9e28a190d069c765bb52135773bbf3639734180e
parent49554ac78eecdba755854e91bbe7c2cc5ea452de
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>
drivers/usb/host/ehci-q.c