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>
This commit is contained in:
Christophe Lebouc 2010-09-30 15:34:36 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 689d6eacd1
Коммит c8458d59d4
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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) {