Skip to content

Commit 89ac31f

Browse files
keithbuschigaw
authored andcommitted
libnvme: do not byte swap command dwords
The dwords always need to be set in the cpu native format. The driver will handle setting up the SQE in the nvme little-endian order, and big endian is never used, so this byte swapping was wrong. Link: linux-nvme/nvme-cli#2761 Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Daniel Wagner <[email protected]>
1 parent 8ddf4c7 commit 89ac31f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/nvme/ioctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,9 +1933,9 @@ static int nvme_set_var_size_tags(__u32 *cmd_dw2, __u32 *cmd_dw3, __u32 *cmd_dw1
19331933
return -1;
19341934
}
19351935

1936-
*cmd_dw2 = cpu_to_be32(cdw2);
1937-
*cmd_dw3 = cpu_to_be32(cdw3);
1938-
*cmd_dw14 = cpu_to_be32(cdw14);
1936+
*cmd_dw2 = cdw2;
1937+
*cmd_dw3 = cdw3;
1938+
*cmd_dw14 = cdw14;
19391939
return 0;
19401940
}
19411941

0 commit comments

Comments
 (0)