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)
commitb13c6393be7dfa780835fd4400d16d0ec1cf128f
tree9e493693736ae3843ae21509a64224c37220335e
parent6c3c05b087ada8947cd31895f67e433070446234
nvme-pci: use max of PRP or SGL for iod size

>From the initial implementation of NVMe SGL kernel support
commit a7a7cbe353a5 ("nvme-pci: add SGL support") with addition of the
commit 943e942e6266 ("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