Skip to contentSkip to conversation

nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms

PATCH In review Vidya Sagar 2 participants 2 messages Feb 17, 2022 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms

All Tegra platforms remove power to the endpoint devices, hence, enable the simple suspend path to avoid issues during resume.

---
 drivers/nvme/host/pci.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/nvme/host/pci.c +16 -0
index ab15bc72710d..f5c5be81d948 100644
@@ -3035,6 +3035,22 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 			return NVME_QUIRK_SIMPLE_SUSPEND;
 	}
 
+	if (of_machine_is_compatible("nvidia,tegra20") ||
+	    of_machine_is_compatible("nvidia,tegra30") ||
+	    of_machine_is_compatible("nvidia,tegra114") ||
+	    of_machine_is_compatible("nvidia,tegra124") ||
+	    of_machine_is_compatible("nvidia,tegra210") ||
+	    of_machine_is_compatible("nvidia,tegra186") ||
+	    of_machine_is_compatible("nvidia,tegra194") ||
+	    of_machine_is_compatible("nvidia,tegra234")) {
+		/*
+		 * Append quick simple suspend quirk for Tegra platforms
+		 * so that the simple suspend path is executed for these
+		 * platforms to avoid any resume failure.
+		 */
+		return NVME_QUIRK_SIMPLE_SUSPEND;
+	}
+
 	return 0;
 }
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · Vidya Sagar

All Tegra platforms remove power to the endpoint devices, hence, enable the simple suspend path to avoid issues during resume.

As repeated about half a dozen times: NAK. We can't quirk every driver for PCIe slot misbhehavior. This needs to go into the PCI/PM core.