Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8458d59 authored by Christophe Lebouc's avatar Christophe Lebouc Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristophe Lebouc <christophex.lebouc@intel.com>
Signed-off-by: default avatarHao Wu <hao.wu@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 689d6eac
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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) {