summaryrefslogtreecommitdiff
path: root/include/linux/lightnvm.h
diff options
context:
space:
mode:
authorMatias Bjørling <mb@lightnvm.io>2018-03-30 01:05:01 +0300
committerJens Axboe <axboe@kernel.dk>2018-03-30 02:29:09 +0300
commitc6ac3f35d46b3c9999838dd13e7e113674f22ffa (patch)
tree136dc460d0d804c71d5093c85d7fc1b5f1e0955b /include/linux/lightnvm.h
parenta04e0cf93aee6b5e59e84ab66253f09eb71d621b (diff)
downloadlinux-c6ac3f35d46b3c9999838dd13e7e113674f22ffa.tar.xz
lightnvm: flatten nvm_id_group into nvm_id
There are no groups in the 2.0 specification, make sure that the nvm_id structure is flattened before 2.0 data structures are added. Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/lightnvm.h')
-rw-r--r--include/linux/lightnvm.h53
1 files changed, 26 insertions, 27 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 7f4b60abdf27..94b704a8d83d 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -154,9 +154,29 @@ struct nvm_id_lp_tbl {
struct nvm_id_lp_mlc mlc;
};
-struct nvm_id_group {
- u8 mtype;
- u8 fmtype;
+struct nvm_addr_format {
+ u8 ch_offset;
+ u8 ch_len;
+ u8 lun_offset;
+ u8 lun_len;
+ u8 pln_offset;
+ u8 pln_len;
+ u8 blk_offset;
+ u8 blk_len;
+ u8 pg_offset;
+ u8 pg_len;
+ u8 sect_offset;
+ u8 sect_len;
+};
+
+struct nvm_id {
+ u8 ver_id;
+ u8 vmnt;
+ u32 cap;
+ u32 dom;
+
+ struct nvm_addr_format ppaf;
+
u8 num_ch;
u8 num_lun;
u16 num_chk;
@@ -180,33 +200,12 @@ struct nvm_id_group {
u16 cpar;
/* 1.2 compatibility */
+ u8 mtype;
+ u8 fmtype;
+
u8 num_pln;
u16 num_pg;
u16 fpg_sz;
-};
-
-struct nvm_addr_format {
- u8 ch_offset;
- u8 ch_len;
- u8 lun_offset;
- u8 lun_len;
- u8 pln_offset;
- u8 pln_len;
- u8 blk_offset;
- u8 blk_len;
- u8 pg_offset;
- u8 pg_len;
- u8 sect_offset;
- u8 sect_len;
-};
-
-struct nvm_id {
- u8 ver_id;
- u8 vmnt;
- u32 cap;
- u32 dom;
- struct nvm_addr_format ppaf;
- struct nvm_id_group grp;
} __packed;
struct nvm_target {