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

Commit bb2195e5 authored by Hemant Kumar's avatar Hemant Kumar Committed by Mayank Rana
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>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 91ae2c08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -810,8 +810,8 @@ static int dwc3_probe(struct platform_device *pdev)
	dwc->xhci_resources[1].name = res->name;

	irq = platform_get_irq(to_platform_device(dwc->dev), 0);
	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);
+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
		xhci->shared_hcd->can_do_streams = 1;

	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 put_usb3_hcd;