git: 4c18ec0e75e1 - main - nvme: Handle get/set feature payloads
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Jan 2026 21:03:13 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=4c18ec0e75e1f2ca99e587d749a9191513e63a29
commit 4c18ec0e75e1f2ca99e587d749a9191513e63a29
Author: Alexey Sukhoguzov <sap@eseipi.net>
AuthorDate: 2024-10-30 10:48:09 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-01-09 20:32:48 +0000
nvme: Handle get/set feature payloads
Signed-off-by: Alexey Sukhoguzov <sap@eseipi.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1444
---
sys/dev/nvme/nvme_ctrlr_cmd.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sys/dev/nvme/nvme_ctrlr_cmd.c b/sys/dev/nvme/nvme_ctrlr_cmd.c
index 5a44ed425acb..1a48a058edd8 100644
--- a/sys/dev/nvme/nvme_ctrlr_cmd.c
+++ b/sys/dev/nvme/nvme_ctrlr_cmd.c
@@ -171,7 +171,11 @@ nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature,
struct nvme_request *req;
struct nvme_command *cmd;
- req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg);
+ if (payload != NULL)
+ req = nvme_allocate_request_vaddr(payload, payload_size,
+ M_WAITOK, cb_fn, cb_arg);
+ else
+ req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg);
cmd = &req->cmd;
cmd->opc = NVME_OPC_SET_FEATURES;
@@ -193,7 +197,11 @@ nvme_ctrlr_cmd_get_feature(struct nvme_controller *ctrlr, uint8_t feature,
struct nvme_request *req;
struct nvme_command *cmd;
- req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg);
+ if (payload != NULL)
+ req = nvme_allocate_request_vaddr(payload, payload_size,
+ M_WAITOK, cb_fn, cb_arg);
+ else
+ req = nvme_allocate_request_null(M_WAITOK, cb_fn, cb_arg);
cmd = &req->cmd;
cmd->opc = NVME_OPC_GET_FEATURES;