]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: Set the prp2 correctly when using more than 4k page
authorKevin Hao <haokexin@gmail.com>
Fri, 18 Oct 2019 02:53:14 +0000 (10:53 +0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 18 Oct 2019 14:09:41 +0000 (23:09 +0900)
commit957f33677cc3cd284ebc9e9742ad53020ee24804
tree5acd12c4cc9d9ce326cc62bf9d75afe8ac0d0719
parent9e1de3161780847a5fcbab7cde1d3800c5f25a0d
nvme-pci: Set the prp2 correctly when using more than 4k page

In the current code, the nvme is using a fixed 4k PRP entry size,
but if the kernel use a page size which is more than 4k, we should
consider the situation that the bv_offset may be larger than the
dev->ctrl.page_size. Otherwise we may miss setting the prp2 and then
cause the command can't be executed correctly.

Fixes: 2a12ad375eed ("nvme-pci: optimize mapping of small single segment requests")
Cc: stable@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c