From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FD422E3385; Tue, 8 Jul 2025 16:51:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751993501; cv=none; b=JXj/orRXOTdbJ/gQ+qRxvQO5GXXeoieNjpYSaENMPxsI5MM0rnAWFZUogxkKbs8BUfbbjvlxWCiJLtt89CoQQ5A6Pr1/52Y2jFoJ7vrWR/u14bV9EDGLMvnBX7HaWlJsJ7qSOYYxxzLDn/yEXYt8+2Zb5GyArvi9rimAHatNHyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751993501; c=relaxed/simple; bh=0g4K9U3MecERI4dzlp5J6o2WtBxw0MuUNfKsuX6mQQk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mMgs2rg2aA8Ez4lkQnEY1i4rl8jEmoHfle7Guc5PJ4aP1zXOTQsJFgnOvZa6c0QauyrkVfIjnJxFz2gTmF8qe/iwzPD8duICvSuRtc03mZ+jWnnUZtyME9Aqe1RxRjKvURIY30C2SqNjBOTX41aSVDZWyWFXBcg0Hq9vLRmJxsE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MJTm42ho; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MJTm42ho" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED7BEC4CEED; Tue, 8 Jul 2025 16:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751993501; bh=0g4K9U3MecERI4dzlp5J6o2WtBxw0MuUNfKsuX6mQQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJTm42ho8HIf+Fgxp2nJQ/IdnbQYh1nG76YVK5Xz0d8M6nq9hKmBsr15NZcB9c+dZ AfoP28EfCAn+T+bbv43Cy+wWApSUgfXh+3BAUfaaeNN9lTpD0iDqq3R8cmw+23zmS7 iROa1Ib5P/Zwkuf23bpbpZYesGBG3sd7nbV7a0KU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vitaly Lifshits , Aleksandr Loktionov , Mor Bar-Gabay , Tony Nguyen , Sasha Levin Subject: [PATCH 6.15 095/178] igc: disable L1.2 PCI-E link substate to avoid performance issue Date: Tue, 8 Jul 2025 18:22:12 +0200 Message-ID: <20250708162239.139179318@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250708162236.549307806@linuxfoundation.org> References: <20250708162236.549307806@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vitaly Lifshits [ Upstream commit 0325143b59c6c6d79987afc57d2456e7a20d13b7 ] 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: 43546211738e ("igc: Add new device ID's") Link: https://lore.kernel.org/intel-wired-lan/15248b4f-3271-42dd-8e35-02bfc92b25e1@intel.com Signed-off-by: Vitaly Lifshits Reviewed-by: Aleksandr Loktionov Tested-by: Mor Bar-Gabay Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/igc/igc_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index b1669d7cf4359..7d8cc783b2282 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7046,6 +7046,10 @@ static int igc_probe(struct pci_dev *pdev, adapter->port_num = hw->bus.func; adapter->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE); + /* Disable ASPM L1.2 on I226 devices to avoid packet loss */ + if (igc_is_device_id_i226(hw)) + pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2); + err = pci_save_state(pdev); if (err) goto err_ioremap; @@ -7426,6 +7430,9 @@ static int __igc_resume(struct device *dev, bool rpm) pci_enable_wake(pdev, PCI_D3hot, 0); pci_enable_wake(pdev, PCI_D3cold, 0); + if (igc_is_device_id_i226(hw)) + pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2); + if (igc_init_interrupt_scheme(adapter, true)) { netdev_err(netdev, "Unable to allocate memory for queues\n"); return -ENOMEM; @@ -7551,6 +7558,9 @@ static pci_ers_result_t igc_io_slot_reset(struct pci_dev *pdev) pci_enable_wake(pdev, PCI_D3hot, 0); pci_enable_wake(pdev, PCI_D3cold, 0); + if (igc_is_device_id_i226(hw)) + pci_disable_link_state_locked(pdev, PCIE_LINK_STATE_L1_2); + /* In case of PCI error, adapter loses its HW address * so we should re-assign it here. */ -- 2.39.5