]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: Save PCI state before putting drive into deepest state
authorMario Limonciello <mario.limonciello@dell.com>
Wed, 18 Sep 2019 18:15:55 +0000 (13:15 -0500)
committerSagi Grimberg <sagi@grimberg.me>
Wed, 25 Sep 2019 19:53:14 +0000 (12:53 -0700)
commit10294548979ac899134da7e9ef18e1c0c47c3458
treed4e5df4625bc631717687ee174a5fec0d0438723
parent87982c5d558d905a44aeea8250a396115085a9d9
nvme-pci: Save PCI state before putting drive into deepest state

The action of saving the PCI state will cause numerous PCI configuration
space reads which depending upon the vendor implementation may cause
the drive to exit the deepest NVMe state.

In these cases ASPM will typically resolve the PCIe link state and APST
may resolve the NVMe power state.  However it has also been observed
that this register access after quiesced will cause PC10 failure
on some device combinations.

To resolve this, move the PCI state saving to before SetFeatures has been
called.  This has been proven to resolve the issue across a 5000 sample
test on previously failing disk/system combinations.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/pci.c