]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
nvme-pci: set min_align_mask
authorJianxiong Gao <jxgao@google.com>
Thu, 29 Apr 2021 17:33:15 +0000 (17:33 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:03:34 +0000 (10:03 +0200)
commitdb5307f55e3bf4d3a988754f8328f13e60d04aa0
tree694eaabf00ef31979b6c927e0937c72fd1ab6666
parentf5d2669485e683883cb9e30934e6d00224a6e81c
nvme-pci: set min_align_mask

BugLink: https://bugs.launchpad.net/bugs/1928850
commit: 3d2d861eb03e8ee96dc430a54361c900cbe28afd

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: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jianxiong Gao <jxgao@google.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/nvme/host/pci.c