summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2010-06-28 22:44:49 +0400
committerWolfgang Denk <wd@denx.de>2010-06-29 23:03:40 +0200
commit9fb3b5085787baad8a133e347ad12c5b3a022e98 (patch)
tree05d5a40fac3db8159a16b2f62aee2585ad0fd1d9 /drivers/usb
parent0d7f4abcf6bbef06504c82e03f11054468262430 (diff)
downloadu-boot-imx-9fb3b5085787baad8a133e347ad12c5b3a022e98.zip
u-boot-imx-9fb3b5085787baad8a133e347ad12c5b3a022e98.tar.gz
u-boot-imx-9fb3b5085787baad8a133e347ad12c5b3a022e98.tar.bz2
EHCI: zero out QH transfer overlay in ehci_submit_async()
ehci_submit_async() doesn't really zero out the QH transfer overlay (as the EHCI specification suggests) which leads to the controller seeing the "token" field as the previous call has left it, i.e.: - if a timeout occured on the previous call (Active bit left as 1), controller incorrectly tries to complete a previous transaction on a newly programmed endpoint; - if a halt occured on the previous call (Halted bit set to 1), controller just ignores the newly programmed TD(s) and the function then keeps returning error ad infinitum. This turned out to be caused by the wrong orger of the arguments to the memset() call in ehci_alloc(), so the allocated TDs weren't cleared either. While at it, stop needlessly initializing the alternate next TD pointer in the QH transfer overlay... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Remy Bohmer <linux@bohmer.net>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hcd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7784d92..37d056e 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -275,7 +275,7 @@ static void *ehci_alloc(size_t sz, size_t align)
return NULL;
}
- memset(p, sz, 0);
+ memset(p, 0, sz);
return p;
}
@@ -350,7 +350,6 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
(dev->parent->devnum << 16) | (0 << 8) | (0 << 0);
qh->qh_endpt2 = cpu_to_hc32(endpt);
qh->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
- qh->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
td = NULL;
tdp = &qh->qh_overlay.qt_next;