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

Commit 04ab591f 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: Disable ep0 and interrupts when clearing run/stop"

parents 9c549fc2 c8ba6a8b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -335,6 +335,8 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc)
				evt->buf, (unsigned long long) evt->dma,
				evt->length);

		memset(evt->buf, 0, evt->length);

		evt->lpos = 0;

		dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(n),
+10 −0
Original line number Diff line number Diff line
@@ -1881,6 +1881,10 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)

		dwc->pullups_connected = true;
	} else {
		dwc3_gadget_disable_irq(dwc);
		__dwc3_gadget_ep_disable(dwc->eps[0]);
		__dwc3_gadget_ep_disable(dwc->eps[1]);

		reg &= ~DWC3_DCTL_RUN_STOP;

		if (dwc->has_hibernation && !suspend)
@@ -3515,6 +3519,12 @@ static irqreturn_t dwc3_interrupt(int irq, void *_dwc)
		temp_cnt += dwc->ev_buffs[i]->count;
	}

	/* If run/stop is cleared don't process any more events */
	if (!dwc->pullups_connected) {
		dev_warn(dwc->dev, "IRQ received but run/stop is cleared\n");
		ret = IRQ_HANDLED;
	}

	spin_unlock(&dwc->lock);

	dwc->irq_start_time[dwc->irq_dbg_index] = start_time;