[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210625052944.4140054-1-kai.heng.feng@canonical.com>
Date: Fri, 25 Jun 2021 13:29:44 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: kbusch@...nel.org, axboe@...com, hch@....de, sagi@...mberg.me
Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>,
Koba Ko <koba.ko@...onical.com>,
linux-nvme@...ts.infradead.org (open list:NVM EXPRESS DRIVER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] Revert "nvme-pci: use simple suspend when a HMB is enabled"
This reverts commit b97120b15ebd3de51325084136d3b9c3cce656d6.
There are at least two issues introduced by that commit.
Config space becomes inaccessible after s2idle:
[ 827.776792] nvme 0000:58:00.0: can't change power state from D3cold to D0 (config space inaccessible)
The NVMe in question is recovered correctly but PCIe ASPM setting is lost as result.
The second one is more severe, the NVMe becomes unreliable and cause the
rootfs unreadable after s2idle.
Since reset DMA is not possible on suspend/resume, revert the commit to
solve the regression.
Cc: Koba Ko <koba.ko@...onical.com>
BugLink: https://bugs.launchpad.net/bugs/1912057
BugLink: https://bugs.launchpad.net/bugs/1927866
Fixes: b97120b15ebd ("nvme-pci: use simple suspend when a HMB is enabled")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
drivers/nvme/host/pci.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index a29b170701fc6..72d2121f82068 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3079,15 +3079,9 @@ static int nvme_suspend(struct device *dev)
* the PCI bus layer to put it into D3 in order to take the PCIe link
* down, so as to allow the platform to achieve its minimum low-power
* state (which may not be possible if the link is up).
- *
- * If a host memory buffer is enabled, shut down the device as the NVMe
- * specification allows the device to access the host memory buffer in
- * host DRAM from all power states, but hosts will fail access to DRAM
- * during S3.
*/
if (pm_suspend_via_firmware() || !ctrl->npss ||
!pcie_aspm_enabled(pdev) ||
- ndev->nr_host_mem_descs ||
(ndev->ctrl.quirks & NVME_QUIRK_SIMPLE_SUSPEND))
return nvme_disable_prepare_reset(ndev, true);
--
2.31.1
Powered by blists - more mailing lists