]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: remap BAR0 to cover admin CQ doorbell for large stride
authorXu Yu <yu.a.xu@intel.com>
Wed, 24 May 2017 08:39:55 +0000 (16:39 +0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Jun 2017 12:29:51 +0000 (14:29 +0200)
commit172983272900c168c3c15dac21778a448cad955d
treeba2515571e9bf4b5f1a9dd69d7c7aaf18008e644
parentacf1aaf33a8af3562ff8ba98f745aa0accc30623
nvme-pci: remap BAR0 to cover admin CQ doorbell for large stride

The existing driver initially maps 8192 bytes of BAR0 which is
intended to cover doorbells of admin SQ and CQ. However, if a
large stride, e.g. 10, is used, the doorbell of admin CQ will
be out of 8192 bytes. Consequently, a page fault will be raised
when the admin CQ doorbell is accessed in nvme_configure_admin_queue().

This patch fixes this issue by remapping BAR0 before accessing
admin CQ doorbell if the initial mapping is not enough.

Signed-off-by: Xu Yu <yu.a.xu@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c
include/linux/nvme.h