mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
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
This commit is contained in:
parent
7631790422
commit
4c18ec0e75
1 changed files with 10 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue