aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/core.c
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2015-11-16 09:34:44 -0500
committerJens Axboe <axboe@fb.com>2015-11-16 17:20:34 -0500
commit7386af270c72be65c7cb2ba4ad0d4e70dc373106 (patch)
treec7974069275f06d340ad7b14f0cb69479bad6110 /drivers/lightnvm/core.c
parentc1480ad5943261e01a62eaa7132eab76f9c490e0 (diff)
lightnvm: remove linear and device addr modes
The linear and device specific address modes can be replaced with a simple offset and bit length conversion that is generic across all devices. This both simplifies the specification and removes the special case for qemu nvme, that previously relied on the linear address mapping. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm/core.c')
-rw-r--r--drivers/lightnvm/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index 899f6b9a9f68..790b1d7a8d43 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -174,8 +174,7 @@ static int nvm_core_init(struct nvm_dev *dev)
174 dev->sec_size = grp->csecs; 174 dev->sec_size = grp->csecs;
175 dev->oob_size = grp->sos; 175 dev->oob_size = grp->sos;
176 dev->sec_per_pg = grp->fpg_sz / grp->csecs; 176 dev->sec_per_pg = grp->fpg_sz / grp->csecs;
177 dev->addr_mode = id->ppat; 177 memcpy(&dev->ppaf, &id->ppaf, sizeof(struct nvm_addr_format));
178 dev->addr_format = id->ppaf;
179 178
180 dev->plane_mode = NVM_PLANE_SINGLE; 179 dev->plane_mode = NVM_PLANE_SINGLE;
181 dev->max_rq_size = dev->ops->max_phys_sect * dev->sec_size; 180 dev->max_rq_size = dev->ops->max_phys_sect * dev->sec_size;