[PATCH] nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms

Vidya Sagar vidyas at nvidia.com
Wed Feb 16 18:36:35 PST 2022


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

Signed-off-by: Vidya Sagar <vidyas at nvidia.com>
---
 drivers/nvme/host/pci.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index ab15bc72710d..f5c5be81d948 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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;
 }
 
-- 
2.17.1




More information about the Linux-nvme mailing list