]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: clear the prp2 field when not used
authorLei Rao <lei.rao@intel.com>
Tue, 29 Nov 2022 09:48:11 +0000 (17:48 +0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 30 Nov 2022 13:34:17 +0000 (14:34 +0100)
commita393e1c9b79ed61cbe9510d39ede93748d4231df
tree385330cd65bbab17d9f89cbe0929ba97e6f1d60e
parent2e4afcf2a0fb92e0d18de1da48f1c494d17ad3c9
nvme-pci: clear the prp2 field when not used

If the prp2 field is not filled in nvme_setup_prp_simple(), the prp2
field is garbage data. According to nvme spec, the prp2 is reserved if
the data transfer does not cross a memory page boundary, so clear it to
zero if it is not used.

Signed-off-by: Lei Rao <lei.rao@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c