Received: by 10.223.176.5 with SMTP id f5csp2803533wra; Mon, 5 Feb 2018 10:05:42 -0800 (PST) X-Google-Smtp-Source: AH8x224/c8KXvqbbe72InZbetO6eNhDaeuAm570N9dYU9OJ6/7W1lNs9+udXP53Iyiv7mTnCzKIy X-Received: by 2002:a17:902:8496:: with SMTP id c22-v6mr23696037plo.36.1517853942661; Mon, 05 Feb 2018 10:05:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517853942; cv=none; d=google.com; s=arc-20160816; b=NSS5xHeCyWpsaJlH5L/aQFVSV3rkdpJY73FFiikMwME99eyl6eHWjNol6auIKWxVJx 65AkwwAmYrOa3LOi0fOoKY7+iRvLzeoAKZVV2vApodw4jkTzRDso7AXfKWX+8gihrjpm xtwfDVMcQ8B92PWiUO8+tAiOAw0onSMmCax8tPot9kMGTV1j7Vy5wP21uNI+RGNmslFr yvFpWB1Qy7rjfPjkWy5fas5O36vkXPbNaKkhwTs/00fhjO1r2l0PD9hFcIvulX1Cgwg+ DXSLylj0/FkMhyN2dH8Gf01pALFdr7sGglmS0bjR06pi5PeCzldIIuEdPYywUSHySrIs xwHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=xFU0Gf18d/HP+HZLQp98n5nzb9BCuU0P7gsfEst4buY=; b=SGwIDSpm9E7gWNM/F3J/T5K9kpjdbppZeNZll1qZGJj/O4fTv++AQE7PKEcMiWW5eL ILeHNdPU+s1t31IBXjw1uPCEK8+wP5wpDqeQiOyPwVxscGymj0hpcYKjQ5h+O3eLltoP 3oW/pHvMb1nQ7Lq9TWfB+ObxMyQpuSWvyiZY+o23IxpzPiCHtfE1ke81xUK1rk7IcAoh 4Q+Y22ti821OJhv35xdcPffdFbbajQzJLkwPTc/mUZxz9jjfX+sZ8jSVmWshq7i72L8t jHjkVe9/3iYc/hVB9nas67W8uMVD27TVCU6OxtD6nOKFIcmopBBnsWkSgyMWA/dsHhkv k4pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=mnWX1b9L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19-v6si7147537plo.128.2018.02.05.10.05.27; Mon, 05 Feb 2018 10:05:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=mnWX1b9L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358AbeBESE4 (ORCPT + 99 others); Mon, 5 Feb 2018 13:04:56 -0500 Received: from merlin.infradead.org ([205.233.59.134]:49154 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155AbeBESEu (ORCPT ); Mon, 5 Feb 2018 13:04:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xFU0Gf18d/HP+HZLQp98n5nzb9BCuU0P7gsfEst4buY=; b=mnWX1b9Ln7/B3K1jnCTU/ZuqTR e0dMhIZKNRUdxfkq5vWQrAqlyey90q+fgKHMWLVY8bK3n7+VymZ2pHRIIAzgC7K9FyGDRgGA8zVPC Vo2X/qx0ecH+VSxWr/sbKrN2VVS0F+ktgZ1x8W65Yqeq36WtzRrfxCFEqExOHJQ/cw3rWOe9MXJy3 2k8epeWjhK67B0Qq5Yj/2VNBSuTFac55u2ItMR1klLUaCiho+cCzR0pekhxkydYvo9VVpsMIVu2ih fjckD2utHic2D0jQQxvZoBrStbbp2n4xTCU4SqSXxM32U0/jGWlITyY9iIZGv5TRTtVGTsrZteB/0 TURyrnTg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.site) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eil8I-00012u-GC; Mon, 05 Feb 2018 18:04:46 +0000 Subject: Re: [PATCH 3/4] lightnvm: add 2.0 geometry identification To: =?UTF-8?Q?Matias_Bj=c3=b8rling?= , linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, javier@cnexlabs.com References: <20180205121505.27563-1-mb@lightnvm.io> <20180205121505.27563-4-mb@lightnvm.io> From: Randy Dunlap Message-ID: Date: Mon, 5 Feb 2018 10:04:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180205121505.27563-4-mb@lightnvm.io> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2018 04:15 AM, Matias Bjørling wrote: > Implement the geometry data structures for 2.0 and enable a drive > to be identified as one, including exposing the appropriate 2.0 > sysfs entries. > > Signed-off-by: Matias Bjørling > --- > drivers/lightnvm/core.c | 2 +- > drivers/nvme/host/lightnvm.c | 334 +++++++++++++++++++++++++++++++++++++------ > include/linux/lightnvm.h | 11 +- > 3 files changed, 295 insertions(+), 52 deletions(-) > > diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c > index c72863b36439..250e74dfa120 100644 > --- a/drivers/lightnvm/core.c > +++ b/drivers/lightnvm/core.c > @@ -934,7 +934,7 @@ static int nvm_init(struct nvm_dev *dev) > pr_debug("nvm: ver:%x nvm_vendor:%x\n", > dev->identity.ver_id, dev->identity.vmnt); > > - if (dev->identity.ver_id != 1) { > + if (dev->identity.ver_id != 1 && dev->identity.ver_id != 2) { > pr_err("nvm: device not supported by kernel."); > goto err; > } Hi, The pr_err() above could be a bit more informative to the user. E.g., pr_err("nvm: device ver_id %d not supported by kernel.", dev->identity.ver_id); BTW, isn't that line missing a '\n'? -- ~Randy