From: Steven Seungcheol Lee Date: Mon, 17 Apr 2023 02:20:23 +0000 (+0900) Subject: ioctl: io management send, receive args fix X-Git-Tag: v1.5~40 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ef27cf88b1aeed3ba778740f5f71dbd98a79073d;p=users%2Fsagi%2Flibnvme.git ioctl: io management send, receive args fix TP4146 Flexible Data Placement 2022.11.30 Ratified Command Dword 10 Bits[31:16] : Management Operation Specific (MOS) Bits[07:00] : Management Operation (MO) Signed-off-by: Steven Seungcheol Lee --- diff --git a/src/nvme/ioctl.c b/src/nvme/ioctl.c index 884554de..6f9d724f 100644 --- a/src/nvme/ioctl.c +++ b/src/nvme/ioctl.c @@ -1913,7 +1913,7 @@ int nvme_resv_report(struct nvme_resv_report_args *args) int nvme_io_mgmt_recv(struct nvme_io_mgmt_recv_args *args) { - __u32 cdw10 = (args->mo & 0xf) | (args->mos & 0xff << 16); + __u32 cdw10 = args->mo | (args->mos << 16); __u32 cdw11 = (args->data_len >> 2) - 1; struct nvme_passthru_cmd cmd = { @@ -1936,7 +1936,7 @@ int nvme_io_mgmt_recv(struct nvme_io_mgmt_recv_args *args) int nvme_io_mgmt_send(struct nvme_io_mgmt_send_args *args) { - __u32 cdw10 = (args->mo & 0xf) | ((args->mos & 0xff) << 16); + __u32 cdw10 = args->mo | (args->mos << 16); struct nvme_passthru_cmd cmd = { .opcode = nvme_cmd_io_mgmt_send,