Patch "igc: Fix Energy Efficient Ethernet support declaration" has been added to the 6.9-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

    igc: Fix Energy Efficient Ethernet support declaration

to the 6.9-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:
     igc-fix-energy-efficient-ethernet-support-declaratio.patch
and it can be found in the queue-6.9 subdirectory.

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



commit efad0a522eb2397015b43fb82a02e6b5ffa2a8c1
Author: Sasha Neftin <sasha.neftin@xxxxxxxxx>
Date:   Mon Jun 3 14:42:35 2024 -0700

    igc: Fix Energy Efficient Ethernet support declaration
    
    [ Upstream commit 7d67d11fbe194f71298263f48e33ae2afa38197e ]
    
    The commit 01cf893bf0f4 ("net: intel: i40e/igc: Remove setting Autoneg in
    EEE capabilities") removed SUPPORTED_Autoneg field but left inappropriate
    ethtool_keee structure initialization. When "ethtool --show <device>"
    (get_eee) invoke, the 'ethtool_keee' structure was accidentally overridden.
    Remove the 'ethtool_keee' overriding and add EEE declaration as per IEEE
    specification that allows reporting Energy Efficient Ethernet capabilities.
    
    Examples:
    Before fix:
    ethtool --show-eee enp174s0
    EEE settings for enp174s0:
            EEE status: not supported
    
    After fix:
    EEE settings for enp174s0:
            EEE status: disabled
            Tx LPI: disabled
            Supported EEE link modes:  100baseT/Full
                                       1000baseT/Full
                                       2500baseT/Full
    
    Fixes: 01cf893bf0f4 ("net: intel: i40e/igc: Remove setting Autoneg in EEE capabilities")
    Suggested-by: Dima Ruinskiy <dima.ruinskiy@xxxxxxxxx>
    Signed-off-by: Sasha Neftin <sasha.neftin@xxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240603-net-2024-05-30-intel-net-fixes-v2-6-e3563aa89b0c@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 1a64f1ca6ca86..e699412d22f68 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -1629,12 +1629,17 @@ static int igc_ethtool_get_eee(struct net_device *netdev,
 	struct igc_hw *hw = &adapter->hw;
 	u32 eeer;
 
+	linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
+			 edata->supported);
+	linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+			 edata->supported);
+	linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+			 edata->supported);
+
 	if (hw->dev_spec._base.eee_enable)
 		mii_eee_cap1_mod_linkmode_t(edata->advertised,
 					    adapter->eee_advert);
 
-	*edata = adapter->eee;
-
 	eeer = rd32(IGC_EEER);
 
 	/* EEE status on negotiated link */
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 4d975d620a8e4..58bc96021bb4c 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -12,6 +12,7 @@
 #include <linux/bpf_trace.h>
 #include <net/xdp_sock_drv.h>
 #include <linux/pci.h>
+#include <linux/mdio.h>
 
 #include <net/ipv6.h>
 
@@ -4876,6 +4877,9 @@ void igc_up(struct igc_adapter *adapter)
 	/* start the watchdog. */
 	hw->mac.get_link_status = true;
 	schedule_work(&adapter->watchdog_task);
+
+	adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T |
+			      MDIO_EEE_2_5GT;
 }
 
 /**




[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