瀏覽代碼

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>
Vardan Mikayelyan 9 年之前
父節點
當前提交
ee3de8d750
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/usb/dwc2/gadget.c

+ 3 - 0
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);