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

Commit 3973fdbe authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Clear TRBs after removing requests"

parents 59858a1c c5a2a134
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -857,6 +857,15 @@ static void dwc3_stop_active_transfers(struct dwc3 *dwc)
				DWC3_CONTROLLER_NOTIFY_CLEAR_DB, 0);

		dwc3_remove_requests(dwc, dep);
		if (dep->endpoint.ep_type != EP_TYPE_GSI &&
					!dep->endpoint.endless) {
			if (dep->trb_pool) {
				memset(&dep->trb_pool[0], 0,
					sizeof(struct dwc3_trb) *
							dep->num_trbs);
				dbg_event(dep->number, "Clr_TRB", 0);
			}
		}
	}
	dbg_log_string("DONE");
}
@@ -3027,6 +3036,8 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
			dep->flags &= ~(DWC3_EP_END_TRANSFER_PENDING |
					DWC3_EP_TRANSFER_STARTED);
			dwc3_gadget_ep_cleanup_cancelled_requests(dep);
			dbg_log_string("DWC3_DEPEVT_EPCMDCMPLT (%d)",
							dep->number);
		}
		break;
	case DWC3_DEPEVT_STREAMEVT: