Received: by 10.223.176.5 with SMTP id f5csp456331wra; Tue, 6 Feb 2018 01:44:29 -0800 (PST) X-Google-Smtp-Source: AH8x2244TYCtcuzehLkoYDy/iyJ/c5x19SkjE7WV8w7OSfSVBLAE3ITRomka1scjPBNPubvDYz3U X-Received: by 2002:a17:902:7e43:: with SMTP id a3-v6mr1874249pln.138.1517910269031; Tue, 06 Feb 2018 01:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517910268; cv=none; d=google.com; s=arc-20160816; b=tonJYIF26eLA6uQuPSrWSKeF/tOvJ6haNaRThHrxlQ8MLMNqdGEK2rRgPa3vwMtkgb /qsE1Xd3PTnWCkI+OIJFeU9/EBQcCDjWEFDNpxNf9g21H/x0fZytJQjPFD7j26Zk5DUs WS+p0k3BUvrX/u2HgehKWUcroE8MknFEvSX0cFpQro2kjQD/H4zso86ir4PJXoytEiHU SM4872lyBWJGz9ShOlsxiHrwyYTQnQ1UblfZNF4MXtbxfxj52MECWJvR1HVU0hKydGLX gU5wLl9DQW933d18y9pGQkMbFtzg8AHDyI2jYmWoL0t3tZCQLzEkhUREPbkqZP3RoRD7 87Eg== 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=JAXljisCXUPQqzCapytTaaeOCBQqBPdQhbCYf88lMuQ=; b=LWwSm/ZtST0BmUAeru/mv0JVavC93GsiQyQ1ocd2IVZbPBbg/vi3f0HaxLqH5N6oGa 7NWL2JxZuehy59za9+mcZ8gJUrM+56/xdKGuu2lDhXxv+tHktvLtb7bS6oHvPBzInght GMUW6EBLJCGN4FD6cp85demHpKbLt9ofVyvOdtfqxbfpRu9+Ii5MleqTbYxt/FLMJQAI tzwFAx6944pZmYqKVcdoMq74obSzXtJh/qPZKjHJ+PL22d5LQKK/YSOq9TgXYS2DKe0F 44DwYeHNQmQLBvNjLRRoQXA1Yy9Ui+IDoclgaY2WCccjQNtLOLsy6Ms1QuAnsOQffsmJ 4HAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=bqxHK+7e; 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 n11si2975621pgq.230.2018.02.06.01.44.13; Tue, 06 Feb 2018 01:44:28 -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=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=bqxHK+7e; 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 S1752544AbeBFJnu (ORCPT + 99 others); Tue, 6 Feb 2018 04:43:50 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34676 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752248AbeBFJnr (ORCPT ); Tue, 6 Feb 2018 04:43:47 -0500 Received: by mail-lf0-f67.google.com with SMTP id k19so1803091lfj.1 for ; Tue, 06 Feb 2018 01:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JAXljisCXUPQqzCapytTaaeOCBQqBPdQhbCYf88lMuQ=; b=bqxHK+7elT6UoXuRobDMqONPvBlhoGdxMxrURWQ+YJ6v8KR7kM0DwFCk9fXqVEnBO/ kBG0qlb6QjxUoVE+CNrGJTdL416LfKW0ROf5URPeLkPxiboS+BjmSCvD4QqA5zKLrbPR rHoa+HV6IJizs4WDhoEolPA987xMIj9tYh3WXVuu43J9VBNRfnvFLO0lX90yYAPAcAr4 SrCYHOZ4/hz33OUdfKW8viRPv7fvN93GswqFuPE7xIyvYdZb6dzDa0xM/KpxLjRVa8vt pyRP0Eff0QDH+kh8vSg9Dimn3sUd/U4pG85uw7RyDwzpNtvd/Mttob4NBxGoNIJxIspp mzHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JAXljisCXUPQqzCapytTaaeOCBQqBPdQhbCYf88lMuQ=; b=btsed/wPeZ6tfTOsbw2L0wMPL/aZkn7B4ZKLr5i9UEKbISFvzT/WYrIUH3Z7I0iGXj rUBaRcuvtVveQn0yASWc4tAU8Xk+Ew5m9fGKhzgxIprQhOa2WXWhwpJY+hE1HKqJ8dJQ DJZOCNGKMYH33jqp9CANn/JfataZ+kwCEZNXxR+AyBhlTVD1Mp7be2JQEMjy61lP2gaR wTSArlMoXCG4cCgQyG1CHsMWhJ2wVbIjvBjDv4o3nUzcpJg+PBqqhZthwcQYSXXWaR5i JDj5HhnM8FVJ9h0E9YiHTFGWhV6co2EEIfP6TePsTXMOOl59YCzljhvnhpTmeMeGIcdB 4eAg== X-Gm-Message-State: APf1xPDjwVb8moyvjwMxXFBXWx2hl0cNAFIo+s5k+QM62hdcoAYcta48 L454XL8ZbrsvHYjBRvGz2MRC+w== X-Received: by 10.46.86.73 with SMTP id k70mr1202360ljb.1.1517910226164; Tue, 06 Feb 2018 01:43:46 -0800 (PST) Received: from [192.168.0.10] (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.googlemail.com with ESMTPSA id c12sm2206703ljf.34.2018.02.06.01.43.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 01:43:45 -0800 (PST) Subject: Re: [PATCH 3/4] lightnvm: add 2.0 geometry identification To: Randy Dunlap , 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: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <1861efa4-bbba-2211-4c45-735b795e4e34@lightnvm.io> Date: Tue, 6 Feb 2018 10:43:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB 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 07:04 PM, Randy Dunlap wrote: > 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'? > Good point! Thanks. I'll add it in.