diff options
author | Vardan Mikayelyan <mvardan@synopsys.com> | 2016-04-28 06:20:48 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-28 09:41:01 +0300 |
commit | ee3de8d750134703c702534173cd8623d1b32c38 (patch) | |
tree | de0a37c011eed70b43a326005092cd2d591c0ef8 | |
parent | 8c3d609275f7f39d308e5c40a6220c67454f7a28 (diff) | |
download | linux-ee3de8d750134703c702534173cd8623d1b32c38.tar.xz |
usb: dwc2: gadget: Prevent handling of host interrupts
In host slave mode, the core asserts the rxready, txfifoempty interrupts
that get serviced in the gadget irq handler. Prevent servicing of these
when not in the gadget mode of operation.
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index d330190f58ef..4c5e3005e1dc 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2425,6 +2425,9 @@ static irqreturn_t dwc2_hsotg_irq(int irq, void *pw) u32 gintsts; u32 gintmsk; + if (!dwc2_is_device_mode(hsotg)) + return IRQ_NONE; + spin_lock(&hsotg->lock); irq_retry: gintsts = dwc2_readl(hsotg->regs + GINTSTS); |