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)
Jan 29 2024, 11:55 AM
Unknown Object (File)
Jan 15 2024, 9:22 PM
Unknown Object (File)
Jan 14 2024, 8:25 AM
Unknown Object (File)
Jan 1 2024, 8:12 AM
Unknown Object (File)
Dec 20 2023, 8:10 AM
Unknown Object (File)
Dec 14 2023, 12:55 AM
Unknown Object (File)
Nov 25 2023, 5:45 AM
Unknown Object (File)
Sep 25 2023, 4:13 AM
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.