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

Commit cf840551 authored by Andiry Xu's avatar Andiry Xu Committed by Sarah Sharp
Browse files

xHCI: Cleanup isoc transfer ring when TD length mismatch found



When a TD length mismatch is found during isoc TRB enqueue, it directly
returns -EINVAL. However, isoc transfer is partially enqueued at this time,
and the ring should be cleared.

This should be backported to kernels as old as 2.6.36, which contain the
commit 522989a2 "xhci: Fix failed
enqueue in the middle of isoch TD."

Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
parent 7c24814f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3324,7 +3324,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
		/* Check TD length */
		/* Check TD length */
		if (running_total != td_len) {
		if (running_total != td_len) {
			xhci_err(xhci, "ISOC TD length unmatch\n");
			xhci_err(xhci, "ISOC TD length unmatch\n");
			return -EINVAL;
			ret = -EINVAL;
			goto cleanup;
		}
		}
	}
	}