From patchwork Thu Aug 2 20:58:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10554249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7E5A13B4 for ; Thu, 2 Aug 2018 20:59:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A50B02C4EB for ; Thu, 2 Aug 2018 20:59:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9896B2C4ED; Thu, 2 Aug 2018 20:59:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93C572C4EB for ; Thu, 2 Aug 2018 20:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731202AbeHBWvw (ORCPT ); Thu, 2 Aug 2018 18:51:52 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:40015 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731233AbeHBWvw (ORCPT ); Thu, 2 Aug 2018 18:51:52 -0400 Received: by mail-lf1-f67.google.com with SMTP id y200-v6so2534164lfd.7 for ; Thu, 02 Aug 2018 13:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H48CS9aBNqkJwyLfS4hKgdgmNwjZR+U90yZjmrUTGyU=; b=fnngLFVmEhhBaQ3hWKVaQc606VTYB1DYfTEv0QgibCi1/LDYOoLVanHOsTQf5WYFn7 b61oKjap1vmbydn+O7O7cixMgCkoTVXPEKCq2pwp/1v3gtgoSmbJQVihqbY7YZHiUAbF xG6e/PlBpyZOs0F2/3WHCRaxtmZXZLbzU57ZYEMUEx4zB7Peaowf/R3/8xZHY579tw3S kHXGZSlk5SNdqir2Pb+/hYns/jQfSDgv4HRGiGvuulg1VagS2LJfmXh/94LhVRYoRpyH o1pEpNlP/jsh2Hds9/EoKA11p/nHxs9wlG/0HUEtTuSnaU5+x/iX8OD/0XBeHZOc1226 2epw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H48CS9aBNqkJwyLfS4hKgdgmNwjZR+U90yZjmrUTGyU=; b=pK4gTy3VrnTH087o2JCEKQUuobTHvigUNEE+7wWPPzOeFul+9bX6UY+rEK0vIkqHie Cq1JQUVIOB/HNTsaR9vtd7E+6sA139uuiDZ6ere1ewbnFzvDp1bxBQOk5tUr1R7F+iJV CUT7hvKgqAKlrLj5gb2GiyLeWgPFuweeRvbdrMycYjLaP6TVlaX/fv1jzImOrcLugz8/ dyGxyOzblyHAaqTnFmlASvcv9S/XIcV8JlNRa0fhsUSztobO9i/F+p4PA0dXBX0SVG9c g9lgFzF7fkIlDy9ctgBrQfQyy/6knMZFE0s5J4Kh44tOS6uPhQibC8GrZiqlUYcXHt61 QgHQ== X-Gm-Message-State: AOUpUlHqtT96Db8CrgKjW4ELdQgf7pZTfMPgFtEmH0M/vU5CH7u49VJO goMHJCVTPZ4Mi+3ckUVnMbWZVQ== X-Google-Smtp-Source: AAOMgpfZZTIoiIee2KmI451/zDcIoa2pO3qSpYFpSlBa002yxcROaIFDrXlHl52qfvACMvoGnXomUQ== X-Received: by 2002:a19:ef13:: with SMTP id n19-v6mr2966877lfh.48.1533243539396; Thu, 02 Aug 2018 13:58:59 -0700 (PDT) Received: from localhost.localdomain (95-166-82-66-cable.dk.customer.tdc.net. [95.166.82.66]) by smtp.gmail.com with ESMTPSA id r73-v6sm574177ljb.16.2018.08.02.13.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 13:58:58 -0700 (PDT) From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, javier@cnexlabs.com, hans.holmberg@cnexlabs.com, hlitz@ucsc.edu, youngtack.jin@circuitblvd.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Mat?= =?utf-8?q?ias_Bj=C3=B8rling?= Subject: [PATCH] lightnvm: pblk: remove unnecessary drive version check Date: Thu, 2 Aug 2018 22:58:41 +0200 Message-Id: <20180802205841.22039-1-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The nvme driver checks for 1.2 and 2.0 compatibility. If an unsupported version is reported, the device will not be initialized. Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 537e98f2b24a..e9e2fedff387 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -1202,14 +1202,6 @@ static void *pblk_init(struct nvm_tgt_dev *dev, struct gendisk *tdisk, pblk->state = PBLK_STATE_RUNNING; pblk->gc.gc_enabled = 0; - if (!(geo->version == NVM_OCSSD_SPEC_12 || - geo->version == NVM_OCSSD_SPEC_20)) { - pblk_err(pblk, "OCSSD version not supported (%u)\n", - geo->version); - kfree(pblk); - return ERR_PTR(-EINVAL); - } - if (geo->version == NVM_OCSSD_SPEC_12 && geo->dom & NVM_RSP_L2P) { pblk_err(pblk, "host-side L2P table not supported. (%x)\n", geo->dom);