HomeFreeBSD

nvme: Remove NVME_MAX_XFER_SIZE, replace inline calculation

Description

nvme: Remove NVME_MAX_XFER_SIZE, replace inline calculation

NVME_MAX_XFER_SIZE used to be a constant (back when MAXPHYS was a
constant) to denote the smaller of MAXPHYS or the largest PRP we could
encode with our prealloation scheme. However, it's no longer constant
since MAXPHYS varies at runtime. In addition, the actual maximum is now
based on the drive's currently in use page_size, which is also a runtime
expression. As such, remove the define and expand it inline in the one
place its used still in the tree.

Sponsored by: Netflix
Reviewed by: chuck
Differential Revision: https://reviews.freebsd.org/D34870

Details

Provenance
impAuthored on Apr 15 2022, 8:41 PM
Reviewer
chuck
Differential Revision
D34870: nvme: Remove NVME_MAX_XFER_SIZE, replace inline calculation
Parents
rG3a468f201062: nvme: Use saved mps when initializing drive
Branches
Unknown
Tags
Unknown