[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/6BX58qVUUx/Ey2@kbusch-mbp.dhcp.thefacebook.com>
Date: Tue, 28 Feb 2023 15:34:07 -0700
From: Keith Busch <kbusch@...nel.org>
To: Mario Limonciello <mario.limonciello@....com>
Cc: Jens Axboe <axboe@...com>, Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, elvis.angelaccio@....org,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme: Add a module parameter for users to force simple
suspend
On Tue, Feb 28, 2023 at 04:11:48PM -0600, Mario Limonciello wrote:
> +static bool nvme_use_simple_suspend(struct pci_dev *pdev)
> +{
> + if (!simple_suspend)
> + return false;
> + if (simple_suspend == 1)
> + return true;
> + return !noacpi && acpi_storage_d3(&pdev->dev);
> +}
> +
> static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> {
> int node, result = -ENOMEM;
> @@ -3128,11 +3145,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>
> quirks |= check_vendor_combination_bug(pdev);
>
> - if (!noacpi && acpi_storage_d3(&pdev->dev)) {
> - /*
> - * Some systems use a bios work around to ask for D3 on
> - * platforms that support kernel managed suspend.
> - */
> + if (nvme_use_simple_suspend(pdev)) {
> dev_info(&pdev->dev,
> "platform quirk: setting simple suspend\n");
> quirks |= NVME_QUIRK_SIMPLE_SUSPEND;
Do you want the user setting "never" to override the driver's default quirks?
Powered by blists - more mailing lists