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

Commit c48db62d authored by Konrad Leszczynski's avatar Konrad Leszczynski Committed by Sasha Levin
Browse files

usb: dwc3: fix for the isoc transfer EP_BUSY flag



[ Upstream commit 9cad39fe4e4a4fe95d8ea5a7b0692b0a6e89e38b ]

commit f3af3651 ("usb: dwc3: gadget: always
enable IOC on bulk/interrupt transfers") ended up
regressing Isochronous endpoints by clearing
DWC3_EP_BUSY flag too early, which resulted in
choppy audio playback over USB.

Fix that by partially reverting original commit and
making sure that we check for isochronous endpoints.

Fixes: f3af3651 ("usb: dwc3: gadget: always enable IOC
		on bulk/interrupt transfers")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarKonrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: default avatarRafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>

Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent a5c2d04b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1931,6 +1931,10 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
		return 1;
	}

	if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
		if ((event->status & DEPEVT_STATUS_IOC) &&
				(trb->ctrl & DWC3_TRB_CTRL_IOC))
			return 0;
	return 1;
}