Received: by 10.223.185.116 with SMTP id b49csp650198wrg; Wed, 21 Feb 2018 04:50:06 -0800 (PST) X-Google-Smtp-Source: AH8x226hkrDSVtxjKOnffXyXv3Rq0/mzlHVp1449I3A3PTKmYlhPYd4TMUH/6q8gnQ1w6a8G5Bnj X-Received: by 2002:a17:902:6a89:: with SMTP id n9-v6mr3064134plk.212.1519217406668; Wed, 21 Feb 2018 04:50:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519217406; cv=none; d=google.com; s=arc-20160816; b=JvouphmIHohgG7+d3COkFlsiEKm5jtESG1au4dB7iCpuFSDUENQfZUluGNglUxOHSZ 8upWJXuyXN9hy1CUyAyLVdjXw+lRjgp0F3uGczmZJhgpHsFcd9niDbBeV33xJf343HzT 29dJwVA4zkwdWUaysRrmWVAWXQT9nz4WhtIgO6MoLX5rA3K7zDUwq7w0ZHg99BC5zi0K DJgPR+N9xEk8TXBcrvvc2yQGzD61UfCa6j1NtLN1tjFW9yEg68LdpX0ERxzxvc9U60aW w4zHpLCANs95qPb9gGWZDiT3SHHa071sFm658JNO7ae15MJSNcB7VvxYzUqqVrdM81BX PvqA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Cqz8IkN9M9pueVJavtdevg20WbJoy5XfdFEDgJqUCgI=; b=LouD2jokR2/6+v8N3T6jfFhDU/nHtfsYsX+KvEYnlZpOgacEz1srmPXMt5nIuqkEI8 K3wNRxmzsE+UUHuJ24qOUxlZ10sbIkZp/oZdTVlkX9zuAxJlnUP8J2xHBFSyaga0asTT icOp/HBpS5sIAN62xI3JoCed5MFF29UGXckAPe2wsBr5jWfJWmNDnfc+LA3FLXoWs4Sz X+esoD6yS262HfTFXYwdK3ZY4cmTdf/ry/DFEH3gkOsvOXchSqsrfI66la+DxUUIp0RW QY/6cv5r5hAkpUF5wYfQ5CZ3P0XHF2GOXuXdbNlngRA12eqi/ak+SoYIWzJkrDZytLWZ ZKpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=0JBqN7iw; 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 e22-v6si10239530plj.13.2018.02.21.04.49.52; Wed, 21 Feb 2018 04:50:06 -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=0JBqN7iw; 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 S932211AbeBUJ1e (ORCPT + 99 others); Wed, 21 Feb 2018 04:27:34 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:44642 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932104AbeBUJ1X (ORCPT ); Wed, 21 Feb 2018 04:27:23 -0500 Received: by mail-wr0-f194.google.com with SMTP id v65so2422028wrc.11 for ; Wed, 21 Feb 2018 01:27:22 -0800 (PST) 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Cqz8IkN9M9pueVJavtdevg20WbJoy5XfdFEDgJqUCgI=; b=0JBqN7iwpx4TyV2+qrCGyx2T6Gtqgzw5HzqpRtEgMhHvBFCoHg4n8DlcG5je+52wFV Ekxr284W75JJ4L5e6VUBjyLSgkP9ogqiydo+rA86KfDuZr+pRkB5v2nnv7Q6iRITcc94 q4Fh/rJIKlm/vTObB2uqQdcU/YkdIdOFPWz6Kq7Qj8Ek9nFPmIsGbf1zTTpgxqIBa3Cc d5fViNfFtHqtbKrrk+Zhhr4a/mXQk4QTzzVcr35N5sVHJWX9wdm8F4kMYiRww8IVjw59 K8/DM/vRf7msI/zFuctW5rCpNiNqIEVkxJOCwogxWCliWkcMiKjhrypUulh4HzRScE8l U+HQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Cqz8IkN9M9pueVJavtdevg20WbJoy5XfdFEDgJqUCgI=; b=MJXYQAbt93FPHG0N+ahcpPwIV6K3+NI2RwoM137ksm/p3KfESPHcZWxUXajihXWPRc N7XsQDowuCKXnz4f/UmJtmVQaqYpUk93IIwSUc/thzel5mggsYA77Hiu4V1kLkZm5xyH roTEgljPnbMHPZIyU4AmvTkMzRu1iJG9XJ55DFql+HfjSakXacFozzLs5m6/1mMJT0FX +fZm5ShxIlTA8ZuFOVj9ONgLlxwYheXUedej55FN/NLhrwQt+Q5il5UBdl3k/4TKQcqh V25WxeuMJEYSdy3NVmemnTXbvFpiy12daJvBcG0LhAnjaJn6trAj7fHPcoTHfpHmfQKM oYmQ== X-Gm-Message-State: APf1xPDGBqGmIQBpeg0Elba+ulwZXQOl351AXj8Ay4ry9VlUwMfxLWEL bH026PeQaxiACtFZduIeSQ1lzQ== X-Received: by 10.80.144.173 with SMTP id c42mr4091410eda.299.1519205242146; Wed, 21 Feb 2018 01:27:22 -0800 (PST) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id a17sm3389955eda.42.2018.02.21.01.27.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 01:27:21 -0800 (PST) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH 12/20] lightnvm: complete 2.0 values in sysfs Date: Wed, 21 Feb 2018 10:26:50 +0100 Message-Id: <1519205218-26994-13-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519205218-26994-1-git-send-email-javier@cnexlabs.com> References: <1519205218-26994-1-git-send-email-javier@cnexlabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add missing geometry values to sysfs. Namely, maxoc and maxocpu. Signed-off-by: Javier González --- drivers/nvme/host/lightnvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 70dc4740f0d3..88c71d0d0d8c 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -1059,6 +1059,10 @@ static ssize_t nvm_dev_attr_show_20(struct device *dev, return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_min); } else if (strcmp(attr->name, "ws_opt") == 0) { return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.ws_opt); + } else if (strcmp(attr->name, "maxoc") == 0) { + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.maxoc); + } else if (strcmp(attr->name, "maxocpu") == 0) { + return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.maxocpu); } else if (strcmp(attr->name, "mw_cunits") == 0) { return scnprintf(page, PAGE_SIZE, "%u\n", dev_geo->c.mw_cunits); } else if (strcmp(attr->name, "write_typ") == 0) { @@ -1158,6 +1162,8 @@ static NVM_DEV_ATTR_20_RO(chunks); static NVM_DEV_ATTR_20_RO(clba); static NVM_DEV_ATTR_20_RO(ws_min); static NVM_DEV_ATTR_20_RO(ws_opt); +static NVM_DEV_ATTR_20_RO(maxoc); +static NVM_DEV_ATTR_20_RO(maxocpu); static NVM_DEV_ATTR_20_RO(mw_cunits); static NVM_DEV_ATTR_20_RO(write_typ); static NVM_DEV_ATTR_20_RO(write_max); @@ -1175,6 +1181,8 @@ static struct attribute *nvm_dev_attrs_20[] = { &dev_attr_clba.attr, &dev_attr_ws_min.attr, &dev_attr_ws_opt.attr, + &dev_attr_maxoc.attr, + &dev_attr_maxocpu.attr, &dev_attr_mw_cunits.attr, &dev_attr_read_typ.attr, -- 2.7.4