From patchwork Mon Feb 26 13:17:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= X-Patchwork-Id: 10242321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 989DA602DC for ; Mon, 26 Feb 2018 13:23:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88974286B5 for ; Mon, 26 Feb 2018 13:23:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D8F929260; Mon, 26 Feb 2018 13:23:27 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 107C2286B5 for ; Mon, 26 Feb 2018 13:23:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753072AbeBZNW7 (ORCPT ); Mon, 26 Feb 2018 08:22:59 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34056 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbeBZNRe (ORCPT ); Mon, 26 Feb 2018 08:17:34 -0500 Received: by mail-wm0-f66.google.com with SMTP id a20so16956889wmd.1 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=ucJBZntu/OF+gD1gkz+ZrrKaz1YAFe27T7jrlSRL+uUQ77GwHe0WOuNgWvw2DcnBuM LwF80XAIovCnHK32cJ64K1Yj66mCnRX9oCq+fZVcwazs6ummEB7bF+M59QEuwCxSI6kP E5QtfXm6WX2OXjYeG1aWDNC5r74uYguAEc8uPvxZ1leuPatuJcfiAFmcgz8sJ02N2I1x UXTpjAPIt+nG+BTcloB8JLJpDtSlptNedU/+zVnD1gHdcdIGq71V5AdMVv7pABscXoQV dtIKEsxvcK0H7EAU2rEZZa1DIQKG1EoYZRrnWUCpqGP5brHW+UWGTZnmCEerBmo5cfuk Fzzw== X-Gm-Message-State: APf1xPCE9dWAeAdwg5XvHMrJOE8wLNx9XD24kq+9StH1jG12T3PgstFF uWgBBdd/HGT59OdJexDHYgF4eyjj X-Google-Smtp-Source: AH8x225fOLPiuRU7XeqqT1XwE5vjpUTS/QjasE0/XTxI+U4RaSJEhVE6KTustfq0oHQE+xmE0MASJg== 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 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 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,