Page MenuHomeFreeBSD

nvme: Fix old intel alignment size
ClosedPublic

Authored by imp on Apr 10 2022, 5:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 10 2024, 2:41 PM
Unknown Object (File)
Dec 4 2024, 2:07 PM
Unknown Object (File)
Nov 27 2024, 8:59 AM
Unknown Object (File)
Nov 27 2024, 7:23 AM
Unknown Object (File)
Nov 25 2024, 9:09 AM
Unknown Object (File)
Nov 19 2024, 12:48 AM
Unknown Object (File)
Nov 16 2024, 12:43 PM
Unknown Object (File)
Oct 31 2024, 9:10 PM
Subscribers

Details

Summary

The intel raid stripe alignment parameter is based on CAP.MPSMIN, so use
that directly now that we have it available.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Apr 10 2022, 5:11 PM
rew added inline comments.
sys/dev/nvme/nvme_ns.c
578–579

got the following error when building:

--- nvme_ns.o ---
 /usr/src/sys/dev/nvme/nvme_ns.c:578:50: error: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wshift-op-parentheses]
                        (1 << ctrlr->cdata.vs[3] + NVME_MPS_SHIFT +
                           ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/src/sys/dev/nvme/nvme_ns.c:578:50: note: place parentheses around the '+' expression to silence this warning
                        (1 << ctrlr->cdata.vs[3] + NVME_MPS_SHIFT +
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1 error generated.
*** [nvme_ns.o] Error code 1
sys/dev/nvme/nvme_ns.c
578–579

Oh, right. I think I've fixed that in my tree...
Oh, I didn't commit it and the change was lost...
Good catch! thanks! I've updated

This revision is now accepted and ready to land.Apr 14 2022, 3:08 PM
This revision was automatically updated to reflect the committed changes.