From: Javier González Date: Sat, 15 Apr 2017 18:55:44 +0000 (+0200) Subject: lightnvm: bad type conversion for nvme control bits X-Git-Tag: v4.12-rc1~119^2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e85292feb98ca8ba4dcd6b5d33e1214a4b54512d;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 12c5a40..4b78090 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -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);