Skip to content

Commit ea37071

Browse files
ValdikSSgregkh
authored andcommitted
igc: fix disabling L1.2 PCI-E link substate on I226 on init
[ Upstream commit 1468c1f ] Device ID comparison in igc_is_device_id_i226 is performed before the ID is set, resulting in always failing check on init. Before the patch: * L1.2 is not disabled on init * L1.2 is properly disabled after suspend-resume cycle With the patch: * L1.2 is properly disabled both on init and after suspend-resume How to test: Connect to the 1G link with 300+ mbit/s Internet speed, and run the download speed test, such as: curl -o /dev/null http://speedtest.selectel.ru/1GB Without L1.2 disabled, the speed would be no more than ~200 mbit/s. With L1.2 disabled, the speed would reach 1 gbit/s. Note: it's required that the latency between your host and the remote be around 3-5 ms, the test inside LAN (<1 ms latency) won't trigger the issue. Link: https://lore.kernel.org/intel-wired-lan/15248b4f-3271-42dd-8e35-02bfc92b25e1@intel.com Fixes: 0325143 ("igc: disable L1.2 PCI-E link substate to avoid performance issue") Signed-off-by: ValdikSS <iam@valdikss.org.ru> Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250819222000.3504873-6-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9ccf8d4 commit ea37071

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7115,6 +7115,13 @@ static int igc_probe(struct pci_dev *pdev,
71157115
adapter->port_num = hw->bus.func;
71167116
adapter->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE);
71177117

7118+
/* PCI config space info */
7119+
hw->vendor_id = pdev->vendor;
7120+
hw->device_id = pdev->device;
7121+
hw->revision_id = pdev->revision;
7122+
hw->subsystem_vendor_id = pdev->subsystem_vendor;
7123+
hw->subsystem_device_id = pdev->subsystem_device;
7124+
71187125
/* Disable ASPM L1.2 on I226 devices to avoid packet loss */
71197126
if (igc_is_device_id_i226(hw))
71207127
pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
@@ -7141,13 +7148,6 @@ static int igc_probe(struct pci_dev *pdev,
71417148
netdev->mem_start = pci_resource_start(pdev, 0);
71427149
netdev->mem_end = pci_resource_end(pdev, 0);
71437150

7144-
/* PCI config space info */
7145-
hw->vendor_id = pdev->vendor;
7146-
hw->device_id = pdev->device;
7147-
hw->revision_id = pdev->revision;
7148-
hw->subsystem_vendor_id = pdev->subsystem_vendor;
7149-
hw->subsystem_device_id = pdev->subsystem_device;
7150-
71517151
/* Copy the default MAC and PHY function pointers */
71527152
memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
71537153
memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));

0 commit comments

Comments
 (0)