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

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

Merge "dwc3: gadget: Clear per endpoint ring buffer when disabling endpoint"

parents cbe0717e 288a4625
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -719,6 +719,13 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)
	dep->type = 0;
	dep->flags = 0;

	/*
	 * Clean up ep ring to avoid getting xferInProgress due to stale trbs
	 * with HWO bit set from previous composition when update transfer cmd
	 * is issued.
	 */
	memset(&dep->trb_pool[0], 0, sizeof(struct dwc3_trb) * DWC3_TRB_NUM);
	dbg_event(dep->number, "Clr_TRB", 0);
	return 0;
}