]> 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)
commit86680c380a0f24b975a2aaa90e0aea3d83dd5d3d
treed4e5df4625bc631717687ee174a5fec0d0438723
parent7147fb56680e45849973d8ecd467cc49988efc9f
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