diff options
author | Javier González <jg@lightnvm.io> | 2016-03-03 09:06:41 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-18 21:10:38 -0400 |
commit | 29fd20b8e68a4d31a82909265b1e650b7b860f54 (patch) | |
tree | 70124e47c668e73a998367e1e142f4680188ef85 /drivers/lightnvm | |
parent | 719b59172cdcd5a2ba532b4bb4d56c36df20c28e (diff) |
lightnvm: do not load L2P table if not supported
An Open-Channel SSD can work on two modes: (i) hybrid mode, where the
L2P table is maintained both by the host and by the device; and (ii)
full host-based, where the L2P table is uniquely maintained by the host.
In the advent of a new target implementing the full host-based mode, do
not assume that the L2P table must be loaded on the generic media
manager; check device properties loaded on the identify command instead.
Signed-off-by: Javier González <javier@cnexlabs.com>
Moved into the following statement.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r-- | drivers/lightnvm/gennvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index 42c1c2ab6cc3..72e124a3927d 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c | |||
@@ -257,7 +257,7 @@ static int gennvm_blocks_init(struct nvm_dev *dev, struct gen_nvm *gn) | |||
257 | } | 257 | } |
258 | } | 258 | } |
259 | 259 | ||
260 | if (dev->ops->get_l2p_tbl) { | 260 | if ((dev->identity.dom & NVM_RSP_L2P) && dev->ops->get_l2p_tbl) { |
261 | ret = dev->ops->get_l2p_tbl(dev, 0, dev->total_secs, | 261 | ret = dev->ops->get_l2p_tbl(dev, 0, dev->total_secs, |
262 | gennvm_block_map, dev); | 262 | gennvm_block_map, dev); |
263 | if (ret) { | 263 | if (ret) { |