[Meego-kernel] [PATCH v2 10/10] usb: langwell_udc: fix big file transfer issue
Wu, Hao
hao.wu
Tue Sep 28 09:57:07 PDT 2010
>From f63205a8399151353cf3b5ea78c6fc4676cb441f Mon Sep 17 00:00:00 2001
From: Hao Wu <hao.wu at intel.com>
Date: Wed, 29 Sep 2010 00:08:36 +0800
Subject: [PATCH] usb: langwell_udc: fix big file transfer issue.
This patch is for big file transfer issue fixing. Swap read order
to avoid unexpected RX status.
Signed-off-by: Christophe Lebouc <christophex.lebouc at intel.com>
Signed-off-by: Hao Wu <hao.wu at intel.com>
---
drivers/usb/gadget/langwell_udc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c
index 40784e8..df297c1 100644
--- a/drivers/usb/gadget/langwell_udc.c
+++ b/drivers/usb/gadget/langwell_udc.c
@@ -2465,12 +2465,14 @@ static int process_ep_req(struct langwell_udc *dev, int index,
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
for (i = 0; i < curr_req->dtd_count; i++) {
- remaining_length = le16_to_cpu(curr_dtd->dtd_total);
- actual -= remaining_length;
/* command execution states by dTD */
dtd_status = curr_dtd->dtd_status;
+ barrier();
+ remaining_length = le16_to_cpu(curr_dtd->dtd_total);
+ actual -= remaining_length;
+
if (!dtd_status) {
/* transfers completed successfully */
if (!remaining_length) {
--
1.5.5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-usb-langwell_udc-fix-big-file-transfer-issue.patch
Type: application/octet-stream
Size: 1274 bytes
Desc: 0010-usb-langwell_udc-fix-big-file-transfer-issue.patch
URL: <http://lists.meego.com/pipermail/meego-kernel/attachments/20100929/4dde2566/attachment.obj>
More information about the Meego-kernel
mailing list