mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
nvme: Base maximum data transfer size directly on MPSMIN in cap_hi
Calculate the maxmimum transfer size based on the MPSMIN we have in our cached copy of cap_hi rather than using min_page_size in the controller. Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D34867
This commit is contained in:
parent
a7218e7a6b
commit
6e3deec8ca
1 changed files with 2 additions and 1 deletions
|
|
@ -474,7 +474,8 @@ nvme_ctrlr_identify(struct nvme_controller *ctrlr)
|
|||
*/
|
||||
if (ctrlr->cdata.mdts > 0)
|
||||
ctrlr->max_xfer_size = min(ctrlr->max_xfer_size,
|
||||
ctrlr->min_page_size * (1 << (ctrlr->cdata.mdts)));
|
||||
1 << (ctrlr->cdata.mdts + NVME_MPS_SHIFT +
|
||||
NVME_CAP_HI_MPSMIN(ctrlr->cap_hi)));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue