nvme-pci: set min_align_mask
authorJianxiong Gao <jxgao@google.com>
Thu, 29 Apr 2021 17:33:15 +0000 (17:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 May 2021 09:04:32 +0000 (11:04 +0200)
commit2fa0387fa2d00924aca0a5fa4c48eb6a4b3f8731
tree75f19d216b0a1d5617825ca2cbdb3fa2a5b0b097
parentf8e71c667ee12094b50f5a935133d080740cd66b
nvme-pci: set min_align_mask

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>
drivers/nvme/host/pci.c