mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
lightnvm: add shorten OCSSD version in geo
Create a shorten version to use in the generic geometry. Signed-off-by: Javier González <[email protected]> Signed-off-by: Matias Bjørling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
3cb98f84d3
commit
f1d4e8121f
2 changed files with 14 additions and 0 deletions
|
|
@ -299,6 +299,9 @@ static int nvme_nvm_setup_12(struct nvme_nvm_id12 *id,
|
|||
geo->major_ver_id = id->ver_id;
|
||||
geo->minor_ver_id = 2;
|
||||
|
||||
/* Set compacted version for upper layers */
|
||||
geo->version = NVM_OCSSD_SPEC_12;
|
||||
|
||||
geo->nr_chnls = src->num_ch;
|
||||
geo->nr_luns = src->num_lun;
|
||||
geo->all_luns = geo->nr_chnls * geo->nr_luns;
|
||||
|
|
@ -384,6 +387,9 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id,
|
|||
geo->major_ver_id = id->mjr;
|
||||
geo->minor_ver_id = id->mnr;
|
||||
|
||||
/* Set compacted version for upper layers */
|
||||
geo->version = NVM_OCSSD_SPEC_20;
|
||||
|
||||
if (!(geo->major_ver_id == 2 && geo->minor_ver_id == 0)) {
|
||||
pr_err("nvm: OCSSD version not supported (v%d.%d)\n",
|
||||
geo->major_ver_id, geo->minor_ver_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue