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

Commit 197598e5 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: dwc3: Change dwc3 irq to oneshot threaded irq



There is a possibility of dwc3 irq being fired as soon as
it gets enabled by tasklet handler. As a result dwc3 hard irq
handler disables the irq and schedules tasklet. If tasklet is
still running, tasklet_schedule becomes no op and dwc3 irq
remains disabled permanently. Fix this issue by handling irq
in threaded context with IRQF_ONESHOT flag set. Also update
the shared irq flag in xhci platform driver for irq registration
in HCD driver.

CRs-Fixed: 1038421
Change-Id: I9291cb08c4597922131b8c2d420e834a00a72621
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 57064792
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1021,8 +1021,8 @@ static int dwc3_probe(struct platform_device *pdev)

	/* will be enabled in dwc3_msm_resume() */
	irq_set_status_flags(irq, IRQ_NOAUTOEN);
	ret = devm_request_irq(dev, irq, dwc3_interrupt, IRQF_SHARED, "dwc3",
			dwc);
	ret = devm_request_threaded_irq(dev, irq, NULL, dwc3_interrupt,
				IRQF_SHARED | IRQF_ONESHOT, "dwc3", dwc);
	if (ret) {
		dev_err(dwc->dev, "failed to request irq #%d --> %d\n",
				irq, ret);
+2 −2
Original line number Diff line number Diff line
@@ -237,11 +237,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
			goto put_usb3_hcd;
	}

	ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
	ret = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_ONESHOT);
	if (ret)
		goto disable_usb_phy;

	ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
	ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED | IRQF_ONESHOT);
	if (ret)
		goto dealloc_usb2_hcd;