Commit 3d2d861e authored by Jianxiong Gao's avatar Jianxiong Gao Committed by Konrad Rzeszutek Wilk

nvme-pci: set min_align_mask

The PRP addressing scheme requires all PRP entries except for the
first one to have a zero offset into the NVMe controller pages (which
can be different from the Linux PAGE_SIZE).  Use the min_align_mask
device parameter to ensure that swiotlb does not change the address
of the buffer modulo the device page size to ensure that the PRPs
won't be malformed.
Signed-off-by: default avatarJianxiong Gao <jxgao@google.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarJianxiong Gao <jxgao@google.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 1f221a0d
...@@ -2629,6 +2629,7 @@ static void nvme_reset_work(struct work_struct *work) ...@@ -2629,6 +2629,7 @@ static void nvme_reset_work(struct work_struct *work)
* Don't limit the IOMMU merged segment size. * Don't limit the IOMMU merged segment size.
*/ */
dma_set_max_seg_size(dev->dev, 0xffffffff); dma_set_max_seg_size(dev->dev, 0xffffffff);
dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1);
mutex_unlock(&dev->shutdown_lock); mutex_unlock(&dev->shutdown_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment