summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorMatias Bjørling <matias@cnexlabs.com>2017-01-31 07:17:15 -0500
committerJens Axboe <axboe@fb.com>2017-01-31 10:32:13 -0500
commit19bd6fe73ca812964963aa30827cff9aae64a715 (patch)
treef01107a5aaa6c09fea5d0ad2454fc9954d8e376c /drivers/lightnvm
parentdab8ee9e8a30620a5b5f22d6c0b3749217093803 (diff)
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>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/core.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 0842c85d3b84..80cd7677762d 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -884,7 +884,7 @@ static int nvm_init_mlc_tbl(struct nvm_dev *dev, struct nvm_id_group *grp)
884static int nvm_core_init(struct nvm_dev *dev) 884static int nvm_core_init(struct nvm_dev *dev)
885{ 885{
886 struct nvm_id *id = &dev->identity; 886 struct nvm_id *id = &dev->identity;
887 struct nvm_id_group *grp = &id->groups[0]; 887 struct nvm_id_group *grp = &id->grp;
888 struct nvm_geo *geo = &dev->geo; 888 struct nvm_geo *geo = &dev->geo;
889 int ret; 889 int ret;
890 890
@@ -988,20 +988,14 @@ static int nvm_init(struct nvm_dev *dev)
988 goto err; 988 goto err;
989 } 989 }
990 990
991 pr_debug("nvm: ver:%x nvm_vendor:%x groups:%u\n", 991 pr_debug("nvm: ver:%x nvm_vendor:%x\n",
992 dev->identity.ver_id, dev->identity.vmnt, 992 dev->identity.ver_id, dev->identity.vmnt);
993 dev->identity.cgrps);
994 993
995 if (dev->identity.ver_id != 1) { 994 if (dev->identity.ver_id != 1) {
996 pr_err("nvm: device not supported by kernel."); 995 pr_err("nvm: device not supported by kernel.");
997 goto err; 996 goto err;
998 } 997 }
999 998
1000 if (dev->identity.cgrps != 1) {
1001 pr_err("nvm: only one group configuration supported.");
1002 goto err;
1003 }
1004
1005 ret = nvm_core_init(dev); 999 ret = nvm_core_init(dev);
1006 if (ret) { 1000 if (ret) {
1007 pr_err("nvm: could not initialize core structures.\n"); 1001 pr_err("nvm: could not initialize core structures.\n");