]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
fix dsm and copy range setup
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 16 Nov 2020 08:52:19 +0000 (09:52 +0100)
committerKeith Busch <kbusch@kernel.org>
Tue, 12 Jan 2021 22:27:40 +0000 (15:27 -0700)
commitcef4760cfad9dc894da8d9c3ccba3dc0d819c472
tree129ce3e6a41a29dedb4a9954945423105b843f0f
parent972922c3da2ff8f88ab642108e566e1be50bbe3a
fix dsm and copy range setup

The argconfig array helpers parse into int and unsigned long long
arrays. In the copy function we are casting an int* to __u16* and we end
up with wrong values. Instead, just use the types in the setup functions
directly and convert the individual values as part of calling the
cpu_to_le* helpers.

While copy is the one that is immediately broken on most systems, do
this for DSM as well since it breaks on systems where int is not 32
bits.

Fixes: 5dc44e6c21a1 ("add support for issuing simple copy commands")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
nvme-ioctl.c
nvme-ioctl.h
nvme.c