]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nvme-pci: Use PCI bus address for data/queues in CMB
authorChristoph Hellwig <hch@lst.de>
Sun, 1 Oct 2017 07:37:35 +0000 (09:37 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 19 Oct 2017 14:49:18 +0000 (09:49 -0500)
commit75e3c6c4f8ebe63414b95610da2c9d9f584f77de
tree1fd2706dc26eaab61a86ba472273a85d388f8ec4
parent2436c3811fe451d7722f6496770fa1956c66a320
nvme-pci: Use PCI bus address for data/queues in CMB

BugLink: http://bugs.launchpad.net/bugs/1723145
commit 8969f1f8291762c13147c1ba89d46238af01675b upstream.

Currently, NVMe PCI host driver is programming CMB dma address as
I/O SQs addresses. This results in failures on systems where 1:1
outbound mapping is not used (example Broadcom iProc SOCs) because
CMB BAR will be progammed with PCI bus address but NVMe PCI EP will
try to access CMB using dma address.

To have CMB working on systems without 1:1 outbound mapping, we
program PCI bus address for I/O SQs instead of dma address. This
approach will work on systems with/without 1:1 outbound mapping.

Based on a report and previous patch from Abhishek Shah.

Fixes: 8ffaadf7 ("NVMe: Use CMB for the IO SQes if available")
Reported-by: Abhishek Shah <abhishek.shah@broadcom.com>
Tested-by: Abhishek Shah <abhishek.shah@broadcom.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/nvme/host/pci.c