lkml.org 
[lkml]   [2018]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 10/15] lightnvm: pblk: check for supported version
    Date
    At this point, only 1.2 spec is supported, thus check for it. Also,
    since device-side L2P is only supported in the 1.2 spec, make sure to
    only check its value under 1.2.

    Signed-off-by: Javier González <javier@cnexlabs.com>
    ---
    drivers/lightnvm/pblk-init.c | 10 ++++++++--
    1 file changed, 8 insertions(+), 2 deletions(-)

    diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
    index 11424beb214c..b67b5b11ae16 100644
    --- a/drivers/lightnvm/pblk-init.c
    +++ b/drivers/lightnvm/pblk-init.c
    @@ -991,9 +991,15 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk,
    struct pblk *pblk;
    int ret;

    - if (dev->geo.dom & NVM_RSP_L2P) {
    + if (geo->version != NVM_OCSSD_SPEC_12) {
    + pr_err("pblk: OCSSD version not supported (%u)\n",
    + geo->version);
    + return ERR_PTR(-EINVAL);
    + }
    +
    + if (geo->version == NVM_OCSSD_SPEC_12 && geo->dom & NVM_RSP_L2P) {
    pr_err("pblk: host-side L2P table not supported. (%x)\n",
    - dev->geo.dom);
    + geo->dom);
    return ERR_PTR(-EINVAL);
    }

    --
    2.7.4
    \
     
     \ /
      Last update: 2018-02-28 18:11    [W:4.146 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site