Skip to content

Commit e85292f

Browse files
Javier Gonzálezaxboe
authored andcommitted
lightnvm: bad type conversion for nvme control bits
The NVMe I/O command control bits are 16 bytes, but is interpreted as 32 bytes in the lightnvm user I/O data path. Signed-off-by: Javier González <[email protected]> Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 7d1ef2f commit e85292f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/lightnvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ static int nvme_nvm_user_vcmd(struct nvme_ns *ns, int admin,
754754
c.common.cdw2[1] = cpu_to_le32(vcmd.cdw3);
755755
/* cdw11-12 */
756756
c.ph_rw.length = cpu_to_le16(vcmd.nppas);
757-
c.ph_rw.control = cpu_to_le32(vcmd.control);
757+
c.ph_rw.control = cpu_to_le16(vcmd.control);
758758
c.common.cdw10[3] = cpu_to_le32(vcmd.cdw13);
759759
c.common.cdw10[4] = cpu_to_le32(vcmd.cdw14);
760760
c.common.cdw10[5] = cpu_to_le32(vcmd.cdw15);

0 commit comments

Comments
 (0)