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

Commit b862369b authored by Vamsi Krishna's avatar Vamsi Krishna
Browse files

xhci: hsic: Disable power event irq during suspend



Spurious power event event irq is observed during device power
off which may result in unclocked register access if it races
hsic runtime suspend. Avoid the unclocked access by disabling
the interrupt while executing suspend routine.

Change-Id: I82f6407a08dc08d87402b616c612ea045b4d180c
Signed-off-by: default avatarVamsi Krishna <vskrishn@codeaurora.org>
parent b2493d05
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -842,11 +842,13 @@ static int mxhci_hsic_suspend(struct mxhci_hsic_hcd *mxhci)
	}

	disable_irq(hcd->irq);
	disable_irq(mxhci->pwr_event_irq);

	/* make sure we don't race against a remote wakeup */
	if (test_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags) ||
	    (readl_relaxed(MSM_HSIC_PORTSC) & PORT_PLS_MASK) == XDEV_RESUME) {
		dev_dbg(mxhci->dev, "wakeup pending, aborting suspend\n");
		enable_irq(mxhci->pwr_event_irq);
		enable_irq(hcd->irq);
		return -EBUSY;
	}
@@ -876,6 +878,7 @@ static int mxhci_hsic_suspend(struct mxhci_hsic_hcd *mxhci)

	mxhci->in_lpm = 1;

	enable_irq(mxhci->pwr_event_irq);
	enable_irq(hcd->irq);

	if (mxhci->wakeup_irq) {