]> git.baikalelectronics.ru Git - kernel.git/commitdiff
lightnvm: bad type conversion for nvme control bits
authorJavier González <jg@lightnvm.io>
Sat, 15 Apr 2017 18:55:44 +0000 (20:55 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 16 Apr 2017 16:06:25 +0000 (10:06 -0600)
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 <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/lightnvm.c

index 12c5a40beb3cd0e31f74f62264087536d34353fc..4b78090518e1c659ea02a4dee97d047bdef5ca0c 100644 (file)
@@ -754,7 +754,7 @@ static int nvme_nvm_user_vcmd(struct nvme_ns *ns, int admin,
        c.common.cdw2[1] = cpu_to_le32(vcmd.cdw3);
        /* cdw11-12 */
        c.ph_rw.length = cpu_to_le16(vcmd.nppas);
-       c.ph_rw.control  = cpu_to_le32(vcmd.control);
+       c.ph_rw.control  = cpu_to_le16(vcmd.control);
        c.common.cdw10[3] = cpu_to_le32(vcmd.cdw13);
        c.common.cdw10[4] = cpu_to_le32(vcmd.cdw14);
        c.common.cdw10[5] = cpu_to_le32(vcmd.cdw15);