nvme-pci: Fix EEH failure on ppc
authorWen Xiong <wenxiong@linux.vnet.ibm.com>
Thu, 15 Feb 2018 20:05:10 +0000 (14:05 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:09 +0000 (07:52 +0200)
commitd68e660604881f9c6de082c4db1473e015f0d41f
tree3897086de9fe9d41e6d466f5ad66015e387b50ef
parent3c84b5aaf7a5ebbdf08ebe08d79c911670712d20
nvme-pci: Fix EEH failure on ppc

[ Upstream commit 651438bb0af5213f1f70d66e75bf11d08cb5537a ]

Triggering PPC EEH detection and handling requires a memory mapped read
failure. The NVMe driver removed the periodic health check MMIO, so
there's no early detection mechanism to trigger the recovery. Instead,
the detection now happens when the nvme driver handles an IO timeout
event. This takes the pci channel offline, so we do not want the driver
to proceed with escalating its own recovery efforts that may conflict
with the EEH handler.

This patch ensures the driver will observe the channel was set to offline
after a failed MMIO read and resets the IO timer so the EEH handler has
a chance to recover the device.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
[updated change log]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/pci.c