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

Commit 76a0a75b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: fix isochronous transfer TRB preparing"

parents 2ab08c7b 90843aaf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1050,6 +1050,15 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
			trbs_left = DWC3_TRB_NUM;
	}

	/*
	 * If free_slot = DWC3_TRB_MASK-1 and trbs_left > 0 then we have a
	 * wraparound in the TRB buffer. Hence, trbs_left includes the link TRB
	 * and must be reduced by 1.
	 */
	if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
		(dep->free_slot & DWC3_TRB_MASK) == DWC3_TRB_MASK-1)
			trbs_left--;

	list_for_each_entry_safe(req, n, &dep->request_list, list) {
		unsigned	length;
		dma_addr_t	dma;