Patch "phy: rockchip-inno-usb2: Fix muxed interrupt support" 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: Fix muxed interrupt support

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-fix-muxed-interrupt-support.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 f289d1c2bd5627853322da716cd25ede8f1e345d
Author: Samuel Holland <samuel@xxxxxxxxxxxx>
Date:   Wed Apr 13 22:22:52 2022 -0500

    phy: rockchip-inno-usb2: Fix muxed interrupt support
    
    [ Upstream commit 6a98df08ccd55e87947d253b19925691763e755c ]
    
    This commit fixes two issues with the muxed interrupt handler. First,
    the OTG port has the "bvalid" interrupt enabled, not "linestate". Since
    only the linestate interrupt was handled, and not the bvalid interrupt,
    plugging in a cable to the OTG port caused an interrupt storm.
    
    Second, the return values from the individual port IRQ handlers need to
    be OR-ed together. Otherwise, the lack of an interrupt from the last
    port would cause the handler to erroneously return IRQ_NONE.
    
    Fixes: ed2b5a8e6b98 ("phy: phy-rockchip-inno-usb2: support muxed interrupts")
    Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
    Tested-by: Michael Riesch <michael.riesch@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220414032258.40984-2-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 eca77e44a4c1..cba5c32cbaee 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -940,8 +940,14 @@ static irqreturn_t rockchip_usb2phy_irq(int irq, void *data)
 		if (!rport->phy)
 			continue;
 
-		/* Handle linestate irq for both otg port and host port */
-		ret = rockchip_usb2phy_linestate_irq(irq, rport);
+		switch (rport->port_id) {
+		case USB2PHY_PORT_OTG:
+			ret |= rockchip_usb2phy_otg_mux_irq(irq, rport);
+			break;
+		case USB2PHY_PORT_HOST:
+			ret |= rockchip_usb2phy_linestate_irq(irq, rport);
+			break;
+		}
 	}
 
 	return ret;



[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