Skip to content

Commit

Permalink
usb: langwell_udc: fix big file transfer issue.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christophe Lebouc authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 689d6ea commit c8458d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/gadget/langwell_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2440,12 +2440,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) {
Expand Down

0 comments on commit c8458d5

Please sign in to comment.