linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms
@ 2022-02-17  2:36 Vidya Sagar
  2022-02-17  6:45 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Vidya Sagar @ 2022-02-17  2:36 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, nitirawa
  Cc: thierry.reding, jonathanh, linux-nvme, Vidya Sagar

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@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms
  2022-02-17  2:36 [PATCH] nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms Vidya Sagar
@ 2022-02-17  6:45 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2022-02-17  6:45 UTC (permalink / raw)
  To: Vidya Sagar
  Cc: kbusch, axboe, hch, sagi, nitirawa, thierry.reding, jonathanh,
	linux-nvme

On Thu, Feb 17, 2022 at 08:06:35AM +0530, Vidya Sagar wrote:
> 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-17  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17  2:36 [PATCH] nvme/pci: Add QUICK_SIMPLE_SUSPEND for Tegra platforms Vidya Sagar
2022-02-17  6:45 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).