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

Commit 821b1d26 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

usb: ci13xxx_udc: Process interrupts as long as USB is outside LPM



The UDC IRQ handler is not acknowledging any interrupt that comes after
the cable is disconnected. This leaves a small window where the controller
can generate an interrupt just after marking the vbus_active to false and
before disabling the controller interrupts. When this happens, the kernel
disables the interrupt thinking it is a broken or bad IRQ after an
interrupt storm. The kernel keeps simulating this interrupt at regular
intervals and if that happens when USB clocks are off, it results in an
unclocked access.

commit c02df9c3 (usb:phy-msm-usb: Fix unclocked access during host bus
suspend) added the vbus_active check in UDC IRQ. Instead add a check to
see if USB is in LPM or not before accessing the registers.

CRs-Fixed: 762343
Change-Id: I153fef046266fe92454ea6ec3cf5a07181af7630
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 15a5a1db
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3802,8 +3802,7 @@ static irqreturn_t udc_irq(void)

	spin_lock(udc->lock);

	if ((udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) &&
				!udc->vbus_active) {
	if (udc->udc_driver->in_lpm && udc->udc_driver->in_lpm(udc)) {
		spin_unlock(udc->lock);
		return IRQ_NONE;
	}