Patch "amd-xgbe: propagate the correct speed and duplex status" 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: propagate the correct speed and duplex status

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-propagate-the-correct-speed-and-duplex-stat.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 17db54b4278d3e48796f4fa32fef86ec137783bd
Author: Raju Rangoju <Raju.Rangoju@xxxxxxx>
Date:   Wed Nov 22 00:44:35 2023 +0530

    amd-xgbe: propagate the correct speed and duplex status
    
    [ Upstream commit 7a2323ac24a50311f64a3a9b54ed5bef5821ecae ]
    
    xgbe_get_link_ksettings() does not propagate correct speed and duplex
    information to ethtool during cable unplug. Due to which ethtool reports
    incorrect values for speed and duplex.
    
    Address this by propagating correct information.
    
    Fixes: 7c12aa08779c ("amd-xgbe: Move the PHY support into amd-xgbe")
    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-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
index a880f10e3e703..d74f45ce06864 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -314,10 +314,15 @@ static int xgbe_get_link_ksettings(struct net_device *netdev,
 
 	cmd->base.phy_address = pdata->phy.address;
 
-	cmd->base.autoneg = pdata->phy.autoneg;
-	cmd->base.speed = pdata->phy.speed;
-	cmd->base.duplex = pdata->phy.duplex;
+	if (netif_carrier_ok(netdev)) {
+		cmd->base.speed = pdata->phy.speed;
+		cmd->base.duplex = pdata->phy.duplex;
+	} else {
+		cmd->base.speed = SPEED_UNKNOWN;
+		cmd->base.duplex = DUPLEX_UNKNOWN;
+	}
 
+	cmd->base.autoneg = pdata->phy.autoneg;
 	cmd->base.port = PORT_NONE;
 
 	XGBE_LM_COPY(cmd, supported, lks, supported);



[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