diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index ce108705bbaf..95827df4cf6a 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -18256,53 +18256,23 @@ 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."), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R750"), }, }, - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "datto"), - DMI_MATCH(DMI_PRODUCT_NAME, "SIRIS 5 1U Server"), - }, - }, {} }; @@ -18320,14 +18290,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 |