kernel-fxtec-pro1x/drivers/nvme/host
Ard Biesheuvel 46e58ffb2e nvme: retain split access workaround for capability reads
[ Upstream commit 3a8ecc935efabdad106b5e06d07b150c394b4465 ]

Commit 7fd8930f26

  "nvme: add a common helper to read Identify Controller data"

has re-introduced an issue that we have attempted to work around in the
past, in commit a310acd7a7 ("NVMe: use split lo_hi_{read,write}q").

The problem is that some PCIe NVMe controllers do not implement 64-bit
outbound accesses correctly, which is why the commit above switched
to using lo_hi_[read|write]q for all 64-bit BAR accesses occuring in
the code.

In the mean time, the NVMe subsystem has been refactored, and now calls
into the PCIe support layer for NVMe via a .reg_read64() method, which
fails to use lo_hi_readq(), and thus reintroduces the problem that the
workaround above aimed to address.

Given that, at the moment, .reg_read64() is only used to read the
capability register [which is known to tolerate split reads], let's
switch .reg_read64() to lo_hi_readq() as well.

This fixes a boot issue on some ARM boxes with NVMe behind a Synopsys
DesignWare PCIe host controller.

Fixes: 7fd8930f26 ("nvme: add a common helper to read Identify Controller data")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:51:16 +01:00
..
core.c nvme: Discard workaround for non-conformant devices 2019-12-31 16:36:01 +01:00
fabrics.c nvme: call nvme_complete_rq when nvmf_check_ready fails for mpath I/O 2018-11-13 11:08:24 -08:00
fabrics.h nvme: if_ready checks to fail io to deleting controller 2018-07-24 13:44:40 +02:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fc: fix double-free scenarios on hw queues 2020-01-09 10:18:54 +01:00
Kconfig IB: Revert "remove redundant INFINIBAND kconfig dependencies" 2018-05-28 10:40:16 -06:00
lightnvm.c lightnvm: do no update csecs and sos on 1.2 2019-11-24 08:20:51 +01:00
Makefile nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
multipath.c nvme-multipath: fix possible io hang after ctrl reconnect 2019-11-12 19:21:11 +01:00
nvme.h nvme: provide fallback for discard alloc failure 2019-12-05 09:20:04 +01:00
pci.c nvme: retain split access workaround for capability reads 2020-01-27 14:51:16 +01:00
rdma.c nvme-rdma: fix a NULL deref when an admin connect times out 2019-05-31 06:46:15 -07:00
trace.c nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00
trace.h nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00