diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-02-08 01:07:06 +0400 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-02-08 01:07:06 +0400 |
commit | 80fd36424bfb8ba1f2c542a7febeb87eb60a8540 (patch) | |
tree | 0fdeef98ed8f0e1b3f09b5a3e3bc24abe72332ae /drivers/usb/host/ehci-q.c | |
parent | d2ceb4e046dda993113961eb62768ec437500b70 (diff) | |
parent | c47f0a04055667de076aacb549f198205dadc999 (diff) |
Merge branch 'tracking-llct-v3.8-misc-fixes' into merge-linux-linaro-core-trackingllct-20130208.0
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 3d989028c836..7842997e06a3 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -1012,6 +1012,12 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) head->qh_next.qh = qh; head->hw->hw_next = dma; + /* + * flush qh descriptor into memory immediately, + * see comments in qh_append_tds. + */ + ehci_sync_mem(); + qh->xacterrs = 0; qh->qh_state = QH_STATE_LINKED; /* qtd completions reported later by interrupt */ @@ -1100,6 +1106,18 @@ static struct ehci_qh *qh_append_tds ( wmb (); dummy->hw_token = token; + /* + * Writing to dma coherent buffer on ARM may + * be delayed to reach memory, so HC may not see + * hw_token of dummy qtd in time, which can cause + * the qtd transaction to be executed very late, + * and degrade performance a lot. ehci_sync_mem + * is added to flush 'token' immediatelly into + * memory, so that ehci can execute the transaction + * ASAP. + */ + ehci_sync_mem(); + urb->hcpriv = qh; } } |