linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] nvme/pci: Add quick suspend quirk for Sc7280 Platform
@ 2022-02-10 16:55 Nitin Rawat
  2022-02-10 19:04 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Nitin Rawat @ 2022-02-10 16:55 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Sagi Grimberg, linux-nvme, linux-kernel
  Cc: Nitin Rawat, Shaik Sajida Bhanu

Enable quick suspend quirks for Sc7280 platform, where power
to nvme device is removed during suspend-resume process. This
is done to avoid the failure dring resume.

This enables simple suspend path for this platform.

Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
---

Change from v1-v2:

*Moving the check condition outside vendor/device check
 to make this platform specific

---
 drivers/nvme/host/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 6a99ed6..fa25d9fab 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3032,6 +3032,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 		if ((dmi_match(DMI_BOARD_VENDOR, "LENOVO")) &&
 		     dmi_match(DMI_BOARD_NAME, "LNVNB161216"))
 			return NVME_QUIRK_SIMPLE_SUSPEND;
+	} else if (of_machine_is_compatible("qcom,sc7280")) {
+		/*
+		 * Append quick suspend quirks for sc7280 platforms
+		 * so that simple suspend path is executed for this
+		 * platform to avoid any resume failure.
+		 */
+		return NVME_QUIRK_SIMPLE_SUSPEND;
 	}

 	return 0;
--
2.7.4


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

* Re: [PATCH v2] nvme/pci: Add quick suspend quirk for Sc7280 Platform
  2022-02-10 16:55 [PATCH v2] nvme/pci: Add quick suspend quirk for Sc7280 Platform Nitin Rawat
@ 2022-02-10 19:04 ` Keith Busch
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2022-02-10 19:04 UTC (permalink / raw)
  To: Nitin Rawat
  Cc: Jens Axboe, Sagi Grimberg, linux-nvme, linux-kernel, Shaik Sajida Bhanu

On Thu, Feb 10, 2022 at 10:25:04PM +0530, Nitin Rawat wrote:
> Enable quick suspend quirks for Sc7280 platform, where power
> to nvme device is removed during suspend-resume process. This
> is done to avoid the failure dring resume.
> 
> This enables simple suspend path for this platform.
> 
> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
> ---
> 
> Change from v1-v2:
> 
> *Moving the check condition outside vendor/device check
>  to make this platform specific
> 
> ---
>  drivers/nvme/host/pci.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 6a99ed6..fa25d9fab 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -3032,6 +3032,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
>  		if ((dmi_match(DMI_BOARD_VENDOR, "LENOVO")) &&
>  		     dmi_match(DMI_BOARD_NAME, "LNVNB161216"))
>  			return NVME_QUIRK_SIMPLE_SUSPEND;
> +	} else if (of_machine_is_compatible("qcom,sc7280")) {
> +		/*
> +		 * Append quick suspend quirks for sc7280 platforms
> +		 * so that simple suspend path is executed for this
> +		 * platform to avoid any resume failure.
> +		 */
> +		return NVME_QUIRK_SIMPLE_SUSPEND;
>  	}

Did you test this? Because I think you said that this is the Kioxa
controller matching the vendor:device in the previos "else if", which
means we won't reach this part.

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

end of thread, other threads:[~2022-02-10 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 16:55 [PATCH v2] nvme/pci: Add quick suspend quirk for Sc7280 Platform Nitin Rawat
2022-02-10 19:04 ` Keith Busch

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).