• Chaitanya Kulkarni's avatar
    nvme-pci: use max of PRP or SGL for iod size · b13c6393
    Chaitanya Kulkarni authored
    >From the initial implementation of NVMe SGL kernel support
    commit a7a7cbe3 ("nvme-pci: add SGL support") with addition of the
    commit 943e942e ("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: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    b13c6393
pci.c 81.7 KB