Received: by 10.223.185.116 with SMTP id b49csp3738437wrg; Mon, 26 Feb 2018 05:21:05 -0800 (PST) X-Google-Smtp-Source: AH8x226kyw35qBXcf0n6yx88XXljncik7ZFVBjKjRy/ISj/T3wsEOBi9dygJGS2JVcfzpwJfp64a X-Received: by 10.99.161.2 with SMTP id b2mr7119444pgf.130.1519651265831; Mon, 26 Feb 2018 05:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519651265; cv=none; d=google.com; s=arc-20160816; b=vdIVs0F4S+02bgyOCAGL0lgqT/qWU351CtydBKF9PVUrGNCJU3wfzQ5BhISpKqd0uY OzHmz9GZ+wsbHdWenK+kXbI8F/yz4r7AQL0MAdggQqOTTyxJ4+pP2+C+KhCfNWlFxOUn osepSSkhyh+W7BsA3oOE5HWSSiiXFGsQcC1Nw4OMvS53E+dqT3lkJVn72Ha0i5kKE/6K iN5A3F2dgETFMRUq02dxtUOqvpU2tvDNj8noMnsyIwDUS4Vb+5cOEs7MbZAJVMRkHvXP oXsxvLBWTj6Z4di1nlZc/icyavkyvByET30+52wRSVd52x80rXGNQg9l4vobXHxoDnuW 2A8g== 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=yWLYP84JrBzmfzp+4nY88AZ7L7LS7RZq9UJJ3JYpUIE=; b=tneTte6zHUyNUAFzbwffSBMamQNTFbRlRHralKuJrZuYTWtQiAJ3qFtiD/9AWHVKOY wsDZx8h2+q8CqsXkBJoIJpkz70kofmfgdDU1MxK/qWPiyf+tQVQ/QY5CKLkPM2r37r80 wh5QDoFPEYKFcI3xOWyv7j2j9K7+K/QiG00rBoLpekoPE/MXn87I8GrqhQkohTc4l5pg BDP3QpYoQrpveN3RJesRKfupJR+GuC5FSApn6pgnX5ZDz2nHNt2zq1PMuyIZbFYUJk4q ++PNaQmAGme8zk2ycIELifDwsQIMmyRxHzU3j9jRGsmh45amgouVygU5FPQGU6U1pDtH /VLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=JN7Rdc1S; 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 g3-v6si6898483pln.755.2018.02.26.05.20.51; Mon, 26 Feb 2018 05:21:05 -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=JN7Rdc1S; 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 S1753470AbeBZNUC (ORCPT + 99 others); Mon, 26 Feb 2018 08:20:02 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33335 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753131AbeBZNRe (ORCPT ); Mon, 26 Feb 2018 08:17:34 -0500 Received: by mail-wm0-f67.google.com with SMTP id s206so16972907wme.0 for ; Mon, 26 Feb 2018 05:17:34 -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=yWLYP84JrBzmfzp+4nY88AZ7L7LS7RZq9UJJ3JYpUIE=; b=JN7Rdc1S7WIkTKpFCTGhMVOsjea7SDvWHDOl2k3wzatXbxYGGcdCnDUcWLOUGASwy9 /JqbQSfVmxBy4kqJrVMuum/K77jfaebLjzh1yHBjf/ME6u4lr1bsOvM8yKLOA4WVW3sQ GQbCnOxdr/MzhvSi6mF7YPGpoHYq6Ea4vLp0Ytgm4SmvpXlTDvymHt3LIpncafmi8c9t 5X/05bhg3arvWabHfgV1Ox93npW3g0DHYDHnpea1dDrTCa5Az0FeqA/uUTq5PeXgwxyJ hEkOP9QxlI6+99UvWaBb7mjYqkCTcW+KG75vPvpSi3C02B9CD0hLW0Rp9SIuzU/ICCxb 6+qA== 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=yWLYP84JrBzmfzp+4nY88AZ7L7LS7RZq9UJJ3JYpUIE=; b=cjBofFrEoVoW8LCxdqWEOR/QqxT+YISlVQbJbNrjxkNw2rzEtClZLwRwTEFgMYSs2e +HglGeGFtD1ccE/t8NF4tErh/TM2n1u56D7XnaN1I0DXdYU8uWwO//XM8gW736kQ2DQB r0ATfQOSNrwH0UJW1G7pFrfouSL6+HiXp+KiKzGUw21usV2OZ+kGc4li5xo3fvazYiwL AWPwncGRlVaDwklegj7315t3SsicTJm8RHnF/l7R0p/1b65wd0r24mlmY/2E/AITr8Fx dglVmU2HTsCNVXxezRyeqmJ6ojLnhvRsYL+IPvSmOE8Pi5qu4EDNvbvHlmbQQlmaDiCD p3bQ== X-Gm-Message-State: APf1xPDzDfiY1vuS0ZzFutLKSH9WW8Ftfft3oq8SG4icfRGxcDYAEGkL Qpge83pA/ITfdLbYpUtblZV6ag== X-Received: by 10.80.214.75 with SMTP id c11mr14800855edj.80.1519651053829; Mon, 26 Feb 2018 05:17:33 -0800 (PST) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id g59sm7097451ede.19.2018.02.26.05.17.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Feb 2018 05:17:33 -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 07/19] lightnvm: complete 2.0 values in sysfs Date: Mon, 26 Feb 2018 14:17:06 +0100 Message-Id: <1519651038-16845-8-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519651038-16845-1-git-send-email-javier@cnexlabs.com> References: <1519651038-16845-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 a8f35e8b7953..4ea553c91756 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -1066,6 +1066,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) { @@ -1163,6 +1167,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); @@ -1179,6 +1185,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