summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-09-14 12:07:50 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-09-14 12:07:50 -0700
commit8e5922b81be9a9548c0cee8ffe3d14bb58b95387 (patch)
tree72356bc5d1fe562cb62f9c4d9e0d8fcd44f8b775 /drivers/usb/host/ehci-q.c
parent3f1fc539a29e09d940df1418b36d23621f85d545 (diff)
parentf392cbf75615e9d8cb90ef5ffb8d4e752b7be3c7 (diff)
Merge branch 'upstream/linaro-3.0' into linaro-android-3.0
Conflicts: arch/arm/kernel/entry-armv.S
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 0917e3a3246..b7f9496e4f0 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -995,6 +995,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_get(qh);
qh->xacterrs = 0;
qh->qh_state = QH_STATE_LINKED;
@@ -1082,6 +1088,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_get (qh);
}
}