Patch "phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     phy-rockchip-inno-usb2-ignore-otg-irqs-in-host-mode.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4d3bb39a7614c6f8aa2e8e30729093889efa1c8d
Author: Samuel Holland <samuel@xxxxxxxxxxxx>
Date:   Fri Jul 8 01:14:34 2022 -0500

    phy: rockchip-inno-usb2: Ignore OTG IRQs in host mode
    
    [ Upstream commit fd7d47484125c7d04578de9294faa7fec6e5df0a ]
    
    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@xxxxxxxxxxxxxxx>
    Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
    Tested-by: Peter Geis <pgwipeout@xxxxxxxxx>
    Tested-by: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220708061434.38115-1-samuel@xxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index cba5c32cbaee..0c6548ac9d8a 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -942,7 +942,9 @@ static irqreturn_t rockchip_usb2phy_irq(int irq, void *data)
 
 		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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux