Skip to content

Commit 0325143

Browse files
vlifshtsanguy11
authored andcommitted
igc: disable L1.2 PCI-E link substate to avoid performance issue
I226 devices advertise support for the PCI-E link L1.2 substate. However, due to a hardware limitation, the exit latency from this low-power state is longer than the packet buffer can tolerate under high traffic conditions. This can lead to packet loss and degraded performance. To mitigate this, disable the L1.2 substate. The increased power draw between L1.1 and L1.2 is insignificant. Fixes: 4354621 ("igc: Add new device ID's") Link: https://lore.kernel.org/intel-wired-lan/[email protected] Signed-off-by: Vitaly Lifshits <[email protected]> Reviewed-by: Aleksandr Loktionov <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent b2beb5b commit 0325143

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7115,6 +7115,10 @@ 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+
/* Disable ASPM L1.2 on I226 devices to avoid packet loss */
7119+
if (igc_is_device_id_i226(hw))
7120+
pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
7121+
71187122
err = pci_save_state(pdev);
71197123
if (err)
71207124
goto err_ioremap;
@@ -7500,6 +7504,9 @@ static int __igc_resume(struct device *dev, bool rpm)
75007504
pci_enable_wake(pdev, PCI_D3hot, 0);
75017505
pci_enable_wake(pdev, PCI_D3cold, 0);
75027506

7507+
if (igc_is_device_id_i226(hw))
7508+
pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2);
7509+
75037510
if (igc_init_interrupt_scheme(adapter, true)) {
75047511
netdev_err(netdev, "Unable to allocate memory for queues\n");
75057512
return -ENOMEM;
@@ -7625,6 +7632,9 @@ static pci_ers_result_t igc_io_slot_reset(struct pci_dev *pdev)
76257632
pci_enable_wake(pdev, PCI_D3hot, 0);
76267633
pci_enable_wake(pdev, PCI_D3cold, 0);
76277634

7635+
if (igc_is_device_id_i226(hw))
7636+
pci_disable_link_state_locked(pdev, PCIE_LINK_STATE_L1_2);
7637+
76287638
/* In case of PCI error, adapter loses its HW address
76297639
* so we should re-assign it here.
76307640
*/

0 commit comments

Comments
 (0)