summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <hemantk@codeaurora.org>2016-07-08 18:18:45 -0700
committerHemant Kumar <hemantk@codeaurora.org>2016-07-08 18:29:32 -0700
commit197598e593982ca4f69e3fb6bfdb735ad056885c (patch)
treea494b046d6b81a56cca66db1907730bc6fbfb9ec
parent57064792421042cc33dc85ac9892b62cefb56299 (diff)
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: Hemant Kumar <hemantk@codeaurora.org>
-rw-r--r--drivers/usb/dwc3/core.c4
-rw-r--r--drivers/usb/host/xhci-plat.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index a395097a2098..7585c603cb3d 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -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);
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 197757c20102..8125a8f96311 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -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;