aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <mb@lightnvm.io>2018-10-09 13:11:32 +0200
committerJens Axboe <axboe@kernel.dk>2018-10-09 08:25:05 -0600
commitd7b6801673f95e5f72efd3ffba1bcbb606883049 (patch)
tree9006c3a21e860d1b534eb87358310b36643aee39 /include/linux/lightnvm.h
parentlightnvm: remove dependencies on BLK_DEV_NVME and PCI (diff)
downloadwireguard-linux-d7b6801673f95e5f72efd3ffba1bcbb606883049.tar.xz
wireguard-linux-d7b6801673f95e5f72efd3ffba1bcbb606883049.zip
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>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index e9e0d1c7eaf5..8acc2fe277d6 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -305,6 +305,8 @@ struct nvm_rq {
u64 ppa_status; /* ppa media status */
int error;
+ int is_seq; /* Sequential hint flag. 1.2 only */
+
void *private;
};