git: f13301fd3cb6 - main - nvme: fix byte conversion macros
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 Aug 2025 16:33:05 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=f13301fd3cb6d1ae3b55e741791cc0abe0427a04
commit f13301fd3cb6d1ae3b55e741791cc0abe0427a04
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-08-28 16:21:54 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-08-28 16:21:54 +0000
nvme: fix byte conversion macros
Fix the byte conversion macros for rsvd{2,3}. They are 32-bit quantity,
not 16, so use htole32. These typically aren't used, so this is a nop
for all in-tree uses. This would only have an effect on
powerpc64. Otherwise, we pass the value through unchanged.
Sponsored by: Netflix
---
sys/dev/nvme/nvme_ctrlr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index fd7f00ced14b..3a7576897603 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1420,8 +1420,8 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr,
req->cmd.opc = npc->opcode;
req->cmd.fuse = npc->flags;
- req->cmd.rsvd2 = htole16(npc->cdw2);
- req->cmd.rsvd3 = htole16(npc->cdw3);
+ req->cmd.rsvd2 = htole32(npc->cdw2);
+ req->cmd.rsvd3 = htole32(npc->cdw3);
req->cmd.cdw10 = htole32(npc->cdw10);
req->cmd.cdw11 = htole32(npc->cdw11);
req->cmd.cdw12 = htole32(npc->cdw12);