lightnvm: reduce number of nvm_id groups to one
The number of configuration groups has been limited to one in current code, even if there is support for up to four. With the introduction of the open-channel SSD 1.3 specification, only a single group is exposed onwards. Reflect this in the nvm_id structure. Signed-off-by: Matias Bjørling <matias@cnexlabs.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
dab8ee9e8a
commit
19bd6fe73c
@@ -884,7 +884,7 @@ static int nvm_init_mlc_tbl(struct nvm_dev *dev, struct nvm_id_group *grp)
|
||||
static int nvm_core_init(struct nvm_dev *dev)
|
||||
{
|
||||
struct nvm_id *id = &dev->identity;
|
||||
struct nvm_id_group *grp = &id->groups[0];
|
||||
struct nvm_id_group *grp = &id->grp;
|
||||
struct nvm_geo *geo = &dev->geo;
|
||||
int ret;
|
||||
|
||||
@@ -988,20 +988,14 @@ static int nvm_init(struct nvm_dev *dev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
pr_debug("nvm: ver:%x nvm_vendor:%x groups:%u\n",
|
||||
dev->identity.ver_id, dev->identity.vmnt,
|
||||
dev->identity.cgrps);
|
||||
pr_debug("nvm: ver:%x nvm_vendor:%x\n",
|
||||
dev->identity.ver_id, dev->identity.vmnt);
|
||||
|
||||
if (dev->identity.ver_id != 1) {
|
||||
pr_err("nvm: device not supported by kernel.");
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (dev->identity.cgrps != 1) {
|
||||
pr_err("nvm: only one group configuration supported.");
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = nvm_core_init(dev);
|
||||
if (ret) {
|
||||
pr_err("nvm: could not initialize core structures.\n");
|
||||
|
Reference in New Issue
Block a user