Patch "net: phy: marvell10g: fix 88x3310 power up" has been added to the 5.10-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

    net: phy: marvell10g: fix 88x3310 power up

to the 5.10-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:
     net-phy-marvell10g-fix-88x3310-power-up.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 619c9956b88c968d91cdeb46ab9173b55c53d89c
Author: Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx>
Date:   Wed Jul 19 17:22:33 2023 +0800

    net: phy: marvell10g: fix 88x3310 power up
    
    [ Upstream commit c7b75bea853daeb64fc831dbf39a6bbabcc402ac ]
    
    Clear MV_V2_PORT_CTRL_PWRDOWN bit to set power up for 88x3310 PHY,
    it sometimes does not take effect immediately. And a read of this
    register causes the bit not to clear. This will cause mv3310_reset()
    to time out, which will fail the config initialization. So add a delay
    before the next access.
    
    Fixes: c9cc1c815d36 ("net: phy: marvell10g: place in powersave mode at probe")
    Signed-off-by: Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx>
    Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 2b64318efdba6..42b48d0d0c4ed 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -263,6 +263,13 @@ static int mv3310_power_up(struct phy_device *phydev)
 	ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL,
 				 MV_V2_PORT_CTRL_PWRDOWN);
 
+	/* Sometimes, the power down bit doesn't clear immediately, and
+	 * a read of this register causes the bit not to clear. Delay
+	 * 100us to allow the PHY to come out of power down mode before
+	 * the next access.
+	 */
+	udelay(100);
+
 	if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310 ||
 	    priv->firmware_ver < 0x00030000)
 		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