diff options
author | Christophe Lebouc <christophex.lebouc@intel.com> | 2010-09-30 10:34:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:22:00 -0400 |
commit | c8458d59d424fcba2456d6cba5811ce01c3aedb9 (patch) | |
tree | 04e17096ae00af488ea8aa49488dc3496df7eaa3 /drivers/usb/gadget/langwell_udc.c | |
parent | 689d6eacd1b7c3677bfe6ee367766f21c3c80e26 (diff) |
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@intel.com>
Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/langwell_udc.c')
-rw-r--r-- | 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 d297f9eb92e4..064306046702 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c | |||
@@ -2440,12 +2440,14 @@ static int process_ep_req(struct langwell_udc *dev, int index, | |||
2440 | dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__); | 2440 | dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__); |
2441 | 2441 | ||
2442 | for (i = 0; i < curr_req->dtd_count; i++) { | 2442 | for (i = 0; i < curr_req->dtd_count; i++) { |
2443 | remaining_length = le16_to_cpu(curr_dtd->dtd_total); | ||
2444 | actual -= remaining_length; | ||
2445 | 2443 | ||
2446 | /* command execution states by dTD */ | 2444 | /* command execution states by dTD */ |
2447 | dtd_status = curr_dtd->dtd_status; | 2445 | dtd_status = curr_dtd->dtd_status; |
2448 | 2446 | ||
2447 | barrier(); | ||
2448 | remaining_length = le16_to_cpu(curr_dtd->dtd_total); | ||
2449 | actual -= remaining_length; | ||
2450 | |||
2449 | if (!dtd_status) { | 2451 | if (!dtd_status) { |
2450 | /* transfers completed successfully */ | 2452 | /* transfers completed successfully */ |
2451 | if (!remaining_length) { | 2453 | if (!remaining_length) { |