[Meego-kernel] [PATCH v2 9/9] usb: langwell_udc: fix big file transfer issue.

Mai, Leonard leonard.mai at intel.com
Sun Oct 3 19:12:58 PDT 2010


>From f2da6098f7a58f62aaa84aee62712b978432c1b7 Mon Sep 17 00:00:00 2001
From: Christophe Lebouc <christophex.lebouc at intel.com>
Date: Thu, 30 Sep 2010 13:50:49 +0100
Subject: [PATCH] usb: langwell_udc: fix big file transfer issue.

This patch fixing the problem with large file transfers failing. Swap the 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>
Signed-off-by: Alan Cox <alan at linux.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.6.0.3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.meego.com/pipermail/meego-kernel/attachments/20101003/556263bc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-usb-langwell_udc-fix-big-file-transfer-issue.patch
Type: application/octet-stream
Size: 1365 bytes
Desc: 0009-usb-langwell_udc-fix-big-file-transfer-issue.patch
URL: <http://lists.meego.com/pipermail/meego-kernel/attachments/20101003/556263bc/attachment-0001.obj>


More information about the Meego-kernel mailing list