]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: combine 1.2 and 2.0 command flags
authorMatias Bjørling <mb@lightnvm.io>
Tue, 9 Oct 2018 11:11:32 +0000 (13:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Oct 2018 14:25:05 +0000 (08:25 -0600)
commitb7deffc138035b16b8812c21fbb371591d30b9d7
tree9006c3a21e860d1b534eb87358310b36643aee39
parent27bf9ef1db55b620cc461c796abd03e9f346f1e3
lightnvm: combine 1.2 and 2.0 command flags

Add nvm_set_flags helper to enable core to appropriately
set the command flags for read/write/erase depending on which version
a drive supports.

The flags arguments can be distilled into the access hint,
scrambling, and program/erase suspend. Replace the access hint with
a "is_seq" parameter. The rest of the flags are dependent on the
command opcode, which is trivial to detect and set.

Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/core.c
drivers/lightnvm/pblk-core.c
drivers/lightnvm/pblk-read.c
drivers/lightnvm/pblk-recovery.c
drivers/lightnvm/pblk-write.c
drivers/lightnvm/pblk.h
include/linux/lightnvm.h