[PATCH V2 0/2] nvme: fix iod size calculation in nvme_probe()

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Thu Jul 9 19:40:23 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 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  | 58 +++++++++++++++++++---------------------
 3 files changed, 42 insertions(+), 44 deletions(-)

-- 
2.26.0




More information about the Linux-nvme mailing list