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

Commit 2a45b557 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: Clear pending events when it is bigger than event buffer size"

parents ae332dd9 f64fc3a9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3501,8 +3501,10 @@ static irqreturn_t dwc3_check_event_buf(struct dwc3 *dwc, u32 buf)
		return IRQ_NONE;

	if (count > evt->length) {
		dev_warn(dwc->dev, "%s: ev_count is huge: %d", __func__, count);
		return IRQ_NONE;
		dbg_event(0xFF, "HUGE_EVCNT", count);
		evt->lpos = (evt->lpos + count) % DWC3_EVENT_BUFFERS_SIZE;
		dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(buf), count);
		return IRQ_HANDLED;
	}

	evt->count = count;