Patch "amd-xgbe: handle corner-case during sfp hotplug" has been added to the 4.19-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

    amd-xgbe: handle corner-case during sfp hotplug

to the 4.19-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:
     amd-xgbe-handle-corner-case-during-sfp-hotplug.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 45a5d83e43f940bddb2a79579acc6bb424f231e0
Author: Raju Rangoju <Raju.Rangoju@xxxxxxx>
Date:   Wed Nov 22 00:44:33 2023 +0530

    amd-xgbe: handle corner-case during sfp hotplug
    
    [ Upstream commit 676ec53844cbdf2f47e68a076cdff7f0ec6cbe3f ]
    
    Force the mode change for SFI in Fixed PHY configurations. Fixed PHY
    configurations needs PLL to be enabled while doing mode set. When the
    SFP module isn't connected during boot, driver assumes AN is ON and
    attempts auto-negotiation. However, if the connected SFP comes up in
    Fixed PHY configuration the link will not come up as PLL isn't enabled
    while the initial mode set command is issued. So, force the mode change
    for SFI in Fixed PHY configuration to fix link issues.
    
    Fixes: e57f7a3feaef ("amd-xgbe: Prepare for working with more than one type of phy")
    Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
    Signed-off-by: Raju Rangoju <Raju.Rangoju@xxxxxxx>
    Reviewed-by: Wojciech Drewek <wojciech.drewek@xxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index d291976d8b761..0e552022e659a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -1178,7 +1178,19 @@ static int xgbe_phy_config_fixed(struct xgbe_prv_data *pdata)
 	if (pdata->phy.duplex != DUPLEX_FULL)
 		return -EINVAL;
 
-	xgbe_set_mode(pdata, mode);
+	/* Force the mode change for SFI in Fixed PHY config.
+	 * Fixed PHY configs needs PLL to be enabled while doing mode set.
+	 * When the SFP module isn't connected during boot, driver assumes
+	 * AN is ON and attempts autonegotiation. However, if the connected
+	 * SFP comes up in Fixed PHY config, the link will not come up as
+	 * PLL isn't enabled while the initial mode set command is issued.
+	 * So, force the mode change for SFI in Fixed PHY configuration to
+	 * fix link issues.
+	 */
+	if (mode == XGBE_MODE_SFI)
+		xgbe_change_mode(pdata, mode);
+	else
+		xgbe_set_mode(pdata, mode);
 
 	return 0;
 }



[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