Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3975499yba; Tue, 7 May 2019 10:01:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzrbJcFlraq/vfujh1fKPsGqRAOfrViNAzIPXEWY/N+XBw+ogK98Na0kIts8gazxCz3L5P X-Received: by 2002:a63:9dc8:: with SMTP id i191mr39784099pgd.91.1557248496375; Tue, 07 May 2019 10:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557248496; cv=none; d=google.com; s=arc-20160816; b=fyx3LnGgSn0YsNoN3Wc9sK/IoajdGg6a6b5wsqXzr3fCPgSTIXvjbne84rp3GgtMRd 6UDR6plv4G95A1asqv1ByHmmMEcrdwmTI34Sc+/ud0IZAV3wR9Vj3q7630yErHHP2svk jIm/lqwwuYGb4bihtKhhnm1KOL6EMupuf5m26fBkJJg+wAYXw3tkBFi+7yxhCg/tEzHB vD7ZtE14UFNKhNIl5xjVGiCQzjAyPqLoY72Ak+1Pr4+b4JwJjV55QK97r6Z8j3JRqXcv lhqED7sMCHvO16E16xbENPOv6xFYPLnLXGSaMENYS5qOqGK/NzXzx28nr1qoNunYqP9U 8RUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=HpUfowzPkPP+EimE58t16S3r0XExpxfBQEdnNQKh3Bc=; b=WLya/EBU+Sd27j68H8qdPd1mQ3k/Y2486YVHvhEc4zOMGqThr9/IpgQR6p2IzQTBIw MWFCdkbvfh47rSLs+z/G+tdFs1rkP4RBokqgqHsVYOLZt3R1apHrrHyHp39GbB3q+e+O 5RJ81GGUbJOxD9ZXzybFNYWcpi442ZiXzb2EURNKfhz8tzZPN1ljNIhgTIfVizOuRo1q EJOfwAhP3yqojM3x/6M9d+uT/2Ryt0pmj9o3LZjGXvroX0hX/E/isDy60ysIl9Z7M845 KoAiDF1kXYAyUG2Ia/MkfKr8E1THoHwc+PE6gygdV4hflkTQ+RO4xK8XX7C8kMiGF6KT qo+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=g9xny6Jg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r26si11349509pgb.32.2019.05.07.10.01.19; Tue, 07 May 2019 10:01:36 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=g9xny6Jg; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727341AbfEGQ7H (ORCPT + 99 others); Tue, 7 May 2019 12:59:07 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45572 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727173AbfEGQ7G (ORCPT ); Tue, 7 May 2019 12:59:06 -0400 Received: by mail-pf1-f196.google.com with SMTP id e24so8945820pfi.12 for ; Tue, 07 May 2019 09:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HpUfowzPkPP+EimE58t16S3r0XExpxfBQEdnNQKh3Bc=; b=g9xny6JgesQKFtGTi5kEK7/Ikcq8NsKELmngrvHowFn6ojZtnzg4X+UR9s9XHsOLMK atxUuP/jBO/XQjlM7YFRyNAGG/kHQaIs20geCqyOQm31bLMI0iu881uzXAL5fKgtw9rk 3rrZtE2h8ztC+6lUMMaT4V3RS/P6d9ItRnxVAi8//paxzCDECnQ1ZiZjhtn0NM/9+4Cn WQjWg6SfxsX2gqxeYz8u4h2YXhCVX4/wEk3g9yO2h/jvCUQDyIFKl9CP0O6JrhwzFMHP 8ZrIEQ1DZnzNVLUaglA2DyxvaYR4khxGLgEumI2+2DCx+CV6hcM5H+xewdX6v8gdk4Ue O7HA== 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; bh=HpUfowzPkPP+EimE58t16S3r0XExpxfBQEdnNQKh3Bc=; b=HwYMzjCfKjPC1rKsJVrHakM6rQa+C48d9rKDrh2RdIzz5+DF0OrSRgIdBbgq49BbSr 7memHf5AEBA4RlVyK4Xsp9mp7fHV4ekgXlb3ZeqUASX+FNridcR49bmPl0yGkaDUtJbq rsx1vGvpuO5F1wawhUiGXBNcjA3YSbxIhxSQsylIndemJ1LGFIdXRmFtvdiptFhExFar bp3NXcJJG7XHUsMn+J3BoXXiHb0cZfFShfN7siOs3Ws4uYnGWkq2lKTdhLYHUolyqT2X 4Vrk94wXupygNA6pcrK1dySbuAje7YYe3SkceaI6igVb8pf3nMgke8jJDi5C2izCJEbX dz2Q== X-Gm-Message-State: APjAAAVTssDnqEcjshGZNm7mO78Bzws8nQgIR33K9vAUPRK+PVLnkgJw l6Dc+UyQiBS9P1N2tjnhOEQ= X-Received: by 2002:a63:3190:: with SMTP id x138mr28837539pgx.402.1557248345314; Tue, 07 May 2019 09:59:05 -0700 (PDT) Received: from mita-MS-7A45.lan ([240f:34:212d:1:1b24:991b:df50:ea3f]) by smtp.gmail.com with ESMTPSA id r12sm18140093pfn.144.2019.05.07.09.59.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 May 2019 09:59:04 -0700 (PDT) From: Akinobu Mita To: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Johannes Berg , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Minwoo Im Subject: [PATCH v2 5/7] nvme: add facility to check log page attributes Date: Wed, 8 May 2019 01:58:32 +0900 Message-Id: <1557248314-4238-6-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557248314-4238-1-git-send-email-akinobu.mita@gmail.com> References: <1557248314-4238-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This provides a facility to check whether the controller supports the telemetry log pages and log page offset field for the Get Log Page command. Cc: Johannes Berg Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Minwoo Im Signed-off-by: Akinobu Mita --- * v2 - New patch in this version. drivers/nvme/host/core.c | 1 + drivers/nvme/host/nvme.h | 1 + include/linux/nvme.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 6265d92..42f09d6 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2580,6 +2580,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) } else ctrl->shutdown_timeout = shutdown_timeout; + ctrl->lpa = id->lpa; ctrl->npss = id->npss; ctrl->apsta = id->apsta; prev_apst_enabled = ctrl->apst_enabled; diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 527d645..8711c71 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -195,6 +195,7 @@ struct nvme_ctrl { u32 vs; u32 sgls; u16 kas; + u8 lpa; u8 npss; u8 apsta; u32 oaes; diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 5217fe4..c1c4ca5 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -294,6 +294,8 @@ enum { NVME_CTRL_OACS_DIRECTIVES = 1 << 5, NVME_CTRL_OACS_DBBUF_SUPP = 1 << 8, NVME_CTRL_LPA_CMD_EFFECTS_LOG = 1 << 1, + NVME_CTRL_LPA_EXTENDED_DATA = 1 << 2, + NVME_CTRL_LPA_TELEMETRY_LOG = 1 << 3, }; struct nvme_lbaf { -- 2.7.4