aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-init.c
diff options
context:
space:
mode:
authorMatias Bjørling <mb@lightnvm.io>2018-10-09 07:11:34 -0400
committerJens Axboe <axboe@kernel.dk>2018-10-09 10:25:06 -0400
commit656e33ca3d405196f94133babc4e38454a49cb73 (patch)
treef16d906f4018ae89cf266c87f8e00666dc3f540a /drivers/lightnvm/pblk-init.c
parent4b5d56edb8fc565c5db029aecaea598eadfba7f6 (diff)
lightnvm: move device L2P detection to core
A 1.2 device is able to manage the logical to physical mapping table internally or leave it to the host. A target only supports one of those approaches, and therefore must check on initialization. Move this check to core to avoid each target implement the check. Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r--drivers/lightnvm/pblk-init.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 537e98f2b24a..039f62d05e84 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -1210,13 +1210,6 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
1210 return ERR_PTR(-EINVAL); 1210 return ERR_PTR(-EINVAL);
1211 } 1211 }
1212 1212
1213 if (geo->version == NVM_OCSSD_SPEC_12 && geo->dom & NVM_RSP_L2P) {
1214 pblk_err(pblk, "host-side L2P table not supported. (%x)\n",
1215 geo->dom);
1216 kfree(pblk);
1217 return ERR_PTR(-EINVAL);
1218 }
1219
1220 spin_lock_init(&pblk->resubmit_lock); 1213 spin_lock_init(&pblk->resubmit_lock);
1221 spin_lock_init(&pblk->trans_lock); 1214 spin_lock_init(&pblk->trans_lock);
1222 spin_lock_init(&pblk->lock); 1215 spin_lock_init(&pblk->lock);