mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From 3ddee7849f0ab4b4edcc812c6569236b53796640 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Holland <samuel@sholland.org>
|
|
Date: Fri, 8 Jul 2022 01:14:34 -0500
|
|
Subject: [PATCH 49/51] phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode
|
|
|
|
When the OTG port is fixed to host mode, the driver does not request its
|
|
IRQs, nor does it enable those IRQs in hardware. Similarly, the driver
|
|
should ignore the OTG port IRQs when handling the shared interrupt.
|
|
|
|
Otherwise, it would update the extcon based on an ID pin which may be in
|
|
an undefined state, or try to queue a uninitialized work item.
|
|
|
|
Fixes: 6a98df08ccd5 ("phy: rockchip-inno-usb2: Fix muxed interrupt support")
|
|
Reported-by: Frank Wunderlich <frank-w@public-files.de>
|
|
Signed-off-by: Samuel Holland <samuel@sholland.org>
|
|
Tested-by: Frank Wunderlich <frank-w@public-files.de>
|
|
Tested-by: Peter Geis <pgwipeout@gmail.com>
|
|
---
|
|
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
|
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
|
@@ -978,7 +978,9 @@ static irqreturn_t rockchip_usb2phy_irq(
|
|
|
|
switch (rport->port_id) {
|
|
case USB2PHY_PORT_OTG:
|
|
- ret |= rockchip_usb2phy_otg_mux_irq(irq, rport);
|
|
+ if (rport->mode != USB_DR_MODE_HOST &&
|
|
+ rport->mode != USB_DR_MODE_UNKNOWN)
|
|
+ ret |= rockchip_usb2phy_otg_mux_irq(irq, rport);
|
|
break;
|
|
case USB2PHY_PORT_HOST:
|
|
ret |= rockchip_usb2phy_linestate_irq(irq, rport);
|