]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: use max of PRP or SGL for iod size
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Mon, 20 Jul 2020 13:23:37 +0000 (15:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:19 +0000 (07:45 +0200)
commit62b4b1d3b65de6fd7cac6e95b18981ee897d0896
tree9e493693736ae3843ae21509a64224c37220335e
parentcfee0e1cf806100591d31de0b7a1556ad45bcdf1
nvme-pci: use max of PRP or SGL for iod size

>From the initial implementation of NVMe SGL kernel support
commit 5c9bf5af3afa ("nvme-pci: add SGL support") with addition of the
commit a1b0961a6b53 ("nvme-pci: limit max IO size and segments to avoid
high order allocations") now there is only caller left for
nvme_pci_iod_alloc_size() which statically passes true for last
parameter that calculates allocation size based on SGL since we need
size of biggest command supported for mempool allocation.

This patch modifies the helper functions nvme_pci_iod_alloc_size() such
that it is now uses maximum of PRP and SGL size for iod allocation size
calculation.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c