From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795053198; b=nCq6xMz+DJgFRIRFN36DaihehwmSY/2zDwJiridM770cZedik/WeLPfXO4sSHuxo4zCN 40SWSmcwTBJWqm9WJ5yQSci27qeduJIlUAjG1GN0iJXKjddwDBheEq7LfegGVEgLPxtkM VJfow2MzKP+D5SqHehi0PHtSbTGhl2YRaOpFygjoQk8NZbM+6/RlD2hXZ+uQ1DzsExjYO OQkEtbT7wU/BiYoW83DCoaX24lUNBDanLkfaRLDgGfLnNTK2eOrE0UWRW6FK2Uhg3runK wcq42tMHJqj4vgeETrP19F4dDVmBqRCgEbc3e0eVD3o5s5cXPKEAjDWHsD8C/JdLllg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795053198; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=ziJ7stWX+gXRr7Uxfte2t6QkekNjNpEdHX2qk43Rn24=; b=Xk7olh30v9teeASoSReG4qL5IvgSMLryKJF0VhldhVLFYsKja49W9okjO2u4W4Wep/qk 7FPGhuMerlJ4u2VfW84T2aIXvL2opJwkXTZvrJjlbvQwXTvmBq6/lWM6pcZ+VHhLqkQmX 0yCiUIgfreR0ERQXlIoah/vI2/zG95bXVf2BTZ1YfIlW6Elm4xeJSEVgPfdAujWbaDEgj QwxwwFWL4/n0ntpIcjEY6RMZIO8of+0R5DZjPhy9XauMb4GOSjeRdR5ClCpyX1mlVgIxQ yPkK/dYDGcffm2jJPFzxW1I8zLdKWwuc/bzwaQew0vNoRnHT3cR2QdzYuDO5EUcp/Pg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=IEC9GhlP; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 848C8606A31C; Thu, 19 Nov 2026 01:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=IEC9GhlP Received: by smtp.kernel.org (Postfix) with ESMTPSA id D59C81F000C4; Thu, 19 Nov 2026 01:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795053198; bh=ziJ7stWX+gXRr7Uxfte2t6QkekNjNpEdHX2qk43Rn24=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IEC9GhlPlFaBsXl4VuudM21x7Ig+YfTuO5F6GI65GbScAbBPbwhAcbguPOH0VeGvX u8Yfq06TOD7xauI4yg4WNjK/39mUwol2tfJkBaxQAIqEstJpIq+ZZepo49Iv8u0OpW Swa+hinktv2llZE4Psf5/Sbg2Nb4l9GL1jItQ8UM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Noam D. Eliyahu" , Pavan Chebbi , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 0832/2214] tg3: Invert restart quirk logic to restrict SNP power-down bypass Date: Wed, 18 Nov 2026 15:41:48 +0100 Message-ID: <20261118150045.330092881@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150009.797899913@linuxfoundation.org> References: <20261118150009.797899913@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Noam D. Eliyahu [ Upstream commit d7314b51341c037973ce022f12c6009fd07b021e ] Commit 9fc3bc764334 ("tg3: power down device only on SYSTEM_POWER_OFF") bypassed `tg3_power_down()` on system restarts to prevent reboot hangs and NMIs on servers where NICs were initialized via SNP (such as Dell PowerEdge R650 and R750). However, skipping the power-down flow globally causes the ACPI _PTS method to trigger fatal PCIe AER events and hangs on other models. Commit e0efe83ed325 ("tg3: Disable tg3 PCIe AER on system reboot") attempted to mitigate this by adding an AER-disable DMI quirk table. Maintaining a growing list of models for a secondary symptom misses the root cause, leaving systems like the PowerEdge T440 (sharing the BCM5720 NIC) exposed. Fix this by inverting the quirk logic: 1. Restrict SNP power-down avoidance strictly to `tg3_restart_snp_quirk_table` for the specific systems requiring it (Dell PowerEdge R650 and R750). 2. Restore standard power-down behavior for all other systems, eliminating the separate AER-disable quirk table. For systems affected by the original SNP restart issue, their shutdown flow remains completely untouched. Link: https://lore.kernel.org/netdev/20251221175050.14089-1-noam.d.eliyahu@gmail.com/T/#u Fixes: 9fc3bc764334 ("tg3: power down device only on SYSTEM_POWER_OFF") Fixes: e0efe83ed325 ("tg3: Disable tg3 PCIe AER on system reboot") Cc: stable@vger.kernel.org Signed-off-by: Noam D. Eliyahu Reviewed-by: Pavan Chebbi Link: https://patch.msgid.link/20261026220955.473247-1-noam.d.eliyahu@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/tg3.c | 42 ++++++++--------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index b60f2bb7dfb32..64e85516c2af1 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -18118,41 +18118,17 @@ static int tg3_resume(struct device *device) static SIMPLE_DEV_PM_OPS(tg3_pm_ops, tg3_suspend, tg3_resume); -/* Systems where ACPI _PTS (Prepare To Sleep) S5 will result in a fatal - * PCIe AER event on the tg3 device if the tg3 device is not, or cannot - * be, powered down. +/* Systems where powering down a tg3 device on restarts triggers + * NMIs and fatal hangs during reboot if the network adapters were + * initialized under SNP. */ -static const struct dmi_system_id tg3_restart_aer_quirk_table[] = { - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R440"), - }, - }, - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R540"), - }, - }, - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R640"), - }, - }, +static const struct dmi_system_id tg3_restart_snp_quirk_table[] = { { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R650"), }, }, - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"), - }, - }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), @@ -18176,14 +18152,18 @@ static void tg3_shutdown(struct pci_dev *pdev) if (netif_running(dev)) dev_close(dev); - if (system_state == SYSTEM_POWER_OFF) + if (!dmi_first_match(tg3_restart_snp_quirk_table) || + system_state == SYSTEM_POWER_OFF) { tg3_power_down(tp); - else if (system_state == SYSTEM_RESTART && - dmi_first_match(tg3_restart_aer_quirk_table) && + } else if (system_state == SYSTEM_RESTART && pdev->current_state != PCI_D3cold && pdev->current_state != PCI_UNKNOWN) { /* Disable PCIe AER on the tg3 to avoid a fatal * error during this system restart. + * Needed since on restarts for systems in + * tg3_restart_snp_quirk_table skipping on powering down the + * tg3 device causes a fatal AER error during ACPI _PTS + * (Prepare To Sleep). */ pcie_capability_clear_word(pdev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_CERE | -- 2.53.0