nvme-pci: derive and better document max segments limits
authorChristoph Hellwig <hch@lst.de>
Tue, 13 May 2025 07:06:49 +0000 (09:06 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 20 May 2025 03:34:27 +0000 (05:34 +0200)
commit414a4c93f1741b820597a746ff64d9cbc69d9f64
treea833429c09318ad4a8f306d6575e60c4b7514c1f
parentde65e642644a20576af4e9d88fcbd911766c6b57
nvme-pci: derive and better document max segments limits

Redefine the max segments and max integrity limits based on the limiting
factors.  This keeps exactly the same values for 4k PAGE_SIZE systems,
but increases the number of segments for larger page size as it properly
derives the scatterlist allocation based limit for them instead of
assuming a 4k PAGE_SIZE.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c