[PATCH V3 0/2] nvme: fix iod size calculation in nvme_probe()
Chaitanya Kulkarni
chaitanya.kulkarni at wdc.com
Sat Jul 11 16:34:52 EDT 2020
Hi,
This is a small patch series which fixes the IO size calulation in the
nvme_probe.
The first patch replaces the ctrl->page_size with a macro. The second
patch calculates the maximum value based on NVMe PRP and SGL size.
I've tested this patch with different block sizes 4k-128k on NVMe QEMU
and NVMe PCIe (non-SGL) controller.
Regards,
Chaitanya
* Changes from V2:-
-------------------
1. Modify commit log for patch 1.
2. Repalace ilog2(NVME_CTRL_PAGE_SIZE) -> NVME_CTRL_PAGE_SHIFT.
* Changes from V1:-
-------------------
1. Remove the ctrl->page_size and use macro instead.
2. Get rid of the conditional operater and use max_t() for SGL vs PRP
size calulation.
Chaitanya Kulkarni (2):
nvme-core: replace ctrl page size with a macro
nvme-pci: use max of PRP or SGL for iod size
drivers/nvme/host/core.c | 19 ++++---------
drivers/nvme/host/nvme.h | 9 +++++-
drivers/nvme/host/pci.c | 60 +++++++++++++++++++---------------------
3 files changed, 43 insertions(+), 45 deletions(-)
--
2.26.0
More information about the Linux-nvme
mailing list