nvme-pci: disable APST on Samsung SSD 960 EVO + ASUS PRIME B350M-A
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Thu, 9 Nov 2017 06:12:03 +0000 (01:12 -0500)
committerChristoph Hellwig <hch@lst.de>
Mon, 20 Nov 2017 07:36:40 +0000 (08:36 +0100)
commit8427bbc224863e14d905c87920d4005cb3e88ac3
tree8f84ace61221698d778d4a4450ec60a1a63bd132
parent9d7fab04b95e8c26014a9bfc1c943b8360b44c17
nvme-pci: disable APST on Samsung SSD 960 EVO + ASUS PRIME B350M-A

The NVMe device in question drops off the PCIe bus after system suspend.
I've tried several approaches to workaround this issue, but none of them
works:
- NVME_QUIRK_DELAY_BEFORE_CHK_RDY
- NVME_QUIRK_NO_DEEPEST_PS
- Disable APST before controller shutdown
- Delay between controller shutdown and system suspend
- Explicitly set power state to 0 before controller shutdown

Fortunately it's a desktop, so disable APST won't hurt the battery.

Also, change the quirk function name to reflect it's for vendor
combination quirks.

BugLink: https://bugs.launchpad.net/bugs/1705748
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c