]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: Remap CMB SQ entries on every controller reset
authorKeith Busch <keith.busch@intel.com>
Tue, 13 Feb 2018 12:44:44 +0000 (05:44 -0700)
committerKeith Busch <keith.busch@intel.com>
Wed, 14 Feb 2018 00:09:50 +0000 (17:09 -0700)
commit442b4a985f5cb072661526d30e193759423dc6cd
treef0accfbfe902638156509dd7f31f3fd597abf1c1
parenta14ae076d2628c5822dba0bf5add774f7f4f288a
nvme-pci: Remap CMB SQ entries on every controller reset

The controller memory buffer is remapped into a kernel address on each
reset, but the driver was setting the submission queue base address
only on the very first queue creation. The remapped address is likely to
change after a reset, so accessing the old address will hit a kernel bug.

This patch fixes that by setting the queue's CMB base address each time
the queue is created.

Fixes: 60c8af5c56cd9 ("nvme: unmap CMB and remove sysfs file in reset path")
Reported-by: Christian Black <christian.d.black@intel.com>
Cc: Jon Derrick <jonathan.derrick@intel.com>
Cc: <stable@vger.kernel.org> # 4.9+
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c