2022-02-11 12:24:40

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

On Fri, Feb 11, 2022 at 02:23:28AM +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.

You need to sort this out in the PCI and PM layers. The broken platform
will also affect all other PCIe drivers and not just nvme.


2022-02-16 17:05:01

by Nitin Rawat

[permalink] [raw]
Subject: RE: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

Hi Christoph/Keith/Rafael

Since we are giving control to PCIe (NVMe power rails control), it can vary from platform to platform.
More over, PCIe driver doesn't control these power rails directly from PCIe driver, they tie nvme supply with one of the pcie supply and control them together.
So i think it would be better to either have quirk based on platform or always setting simple suspend and platform which needs full suspend can update it through some means.

Based on below link, Looks like this can be across platform ...vidya also mention similar concern for tegra platform.
https://lore.kernel.org/lkml/[email protected]/T/#md10b0108b3ccbb1254fe0ad8dbb6e98044a8820b

Please let me know your opinions.

Thanks,
Nitin
-----Original Message-----
From: Christoph Hellwig <[email protected]>
Sent: Friday, February 11, 2022 11:53 AM
To: Nitin Rawat (QUIC) <[email protected]>
Cc: Keith Busch <[email protected]>; Jens Axboe <[email protected]>; Sagi Grimberg <[email protected]>; [email protected]; [email protected]; Sajida Bhanu (Temp) (QUIC) <[email protected]>
Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

On Fri, Feb 11, 2022 at 02:23:28AM +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.

You need to sort this out in the PCI and PM layers. The broken platform will also affect all other PCIe drivers and not just nvme.

2022-02-16 18:59:53

by Nitin Rawat

[permalink] [raw]
Subject: RE: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

Hi Christoph/Keith/Rafael

Since we are giving control to PCIe (NVMe power rails control), it can vary from platform to platform.
More over, PCIe driver doesn't control these power rails directly from PCIe driver, they tie nvme supply with one of the pcie supply and control them together.
So i think it would be better to either have quirk based on platform or always setting simple suspend and platform which needs full suspend can update it through some means.

Based on below link, Looks like this can be across platform ...vidya also mention similar concern for tegra platform.
https://lore.kernel.org/lkml/[email protected]/T/#md10b0108b3ccbb1254fe0ad8dbb6e98044a8820b

Please let me know your opinions.

Thanks,
Nitin
-----Original Message-----
From: Christoph Hellwig <[email protected]>
Sent: Friday, February 11, 2022 11:53 AM
To: Nitin Rawat (QUIC) <[email protected]>
Cc: Keith Busch <[email protected]>; Jens Axboe <[email protected]>; Sagi Grimberg <[email protected]>; [email protected]; [email protected]; Sajida Bhanu (Temp) (QUIC) <[email protected]>
Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

On Fri, Feb 11, 2022 at 02:23:28AM +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.

You need to sort this out in the PCI and PM layers. The broken platform will also affect all other PCIe drivers and not just nvme.

2022-02-16 19:20:32

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform

On Wed, Feb 16, 2022 at 04:07:05PM +0000, Nitin Rawat (QUIC) wrote:
> Hi Christoph/Keith/Rafael
>
> Since we are giving control to PCIe (NVMe power rails control), it can vary from platform to platform.
> More over, PCIe driver doesn't control these power rails directly from PCIe driver, they tie nvme supply with one of the pcie supply and control them together.
> So i think it would be better to either have quirk based on platform or always setting simple suspend and platform which needs full suspend can update it through some means.
>
> Based on below link, Looks like this can be across platform ...vidya also mention similar concern for tegra platform.

Here is the thing: nothing here is really NVMe specific. We do have
a bunch of drivers including nvme that would love to not do a full
firmware shutdown on a suspend. For storage devices this is especially
important as each shutdown reduces media life time. Until very recently
this has been perfectly fine, but now various platforms show up that
want to completely disable power to PCIe slots on a system suspend.

The drivers need information from the PCI / PM core when a ->suspend
call requires the device to got into D3 and when not, and we can't just
do that with quirks in the various drivers.

2022-02-17 07:58:54

by Vidya Sagar

[permalink] [raw]
Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform



On 2/16/2022 9:39 PM, Nitin Rawat (QUIC) wrote:
> External email: Use caution opening links or attachments
>
>
> Hi Christoph/Keith/Rafael
>
> Since we are giving control to PCIe (NVMe power rails control), it can vary from platform to platform.
> More over, PCIe driver doesn't control these power rails directly from PCIe driver, they tie nvme supply with one of the pcie supply and control them together.
> So i think it would be better to either have quirk based on platform or always setting simple suspend and platform which needs full suspend can update it through some means.
Agree with this comment.
I pushed a similar patch for Tegra platforms @
https://lore.kernel.org/linux-nvme/[email protected]/T/#u

- Vidya Sagar
>
> Based on below link, Looks like this can be across platform ...vidya also mention similar concern for tegra platform.
> https://lore.kernel.org/lkml/[email protected]/T/#md10b0108b3ccbb1254fe0ad8dbb6e98044a8820b
>
> Please let me know your opinions.
>
> Thanks,
> Nitin
> -----Original Message-----
> From: Christoph Hellwig <[email protected]>
> Sent: Friday, February 11, 2022 11:53 AM
> To: Nitin Rawat (QUIC) <[email protected]>
> Cc: Keith Busch <[email protected]>; Jens Axboe <[email protected]>; Sagi Grimberg <[email protected]>; [email protected]; [email protected]; Sajida Bhanu (Temp) (QUIC) <[email protected]>
> Subject: Re: [PATCH v3] nvme/pci: Add quick suspend quirk for Sc7280 Platform
>
> On Fri, Feb 11, 2022 at 02:23:28AM +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.
>
> You need to sort this out in the PCI and PM layers. The broken platform will also affect all other PCIe drivers and not just nvme.
>