From patchwork Wed Oct 11 17:57:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 10000265 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 A6E7960244 for ; Wed, 11 Oct 2017 17:57:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C20528ADE for ; Wed, 11 Oct 2017 17:57:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F7F128AFE; Wed, 11 Oct 2017 17:57:44 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9713D28ADE for ; Wed, 11 Oct 2017 17:57:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 543A321F7D517; Wed, 11 Oct 2017 10:54:13 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=dave.jiang@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8DCC621F7D50A for ; Wed, 11 Oct 2017 10:54:11 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 11 Oct 2017 10:57:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,362,1503385200"; d="scan'208"; a="1024168243" Received: from djiang5-desk3.ch.intel.com ([143.182.137.38]) by orsmga003.jf.intel.com with ESMTP; 11 Oct 2017 10:57:40 -0700 Subject: [PATCH] libnvdimm: add smart payload fields added in DSM 1.6 From: Dave Jiang To: dan.j.williams@intel.com Date: Wed, 11 Oct 2017 10:57:40 -0700 Message-ID: <150774466038.55191.18214496952092405741.stgit@djiang5-desk3.ch.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: piotr.balcer@intel.com, linux-nvdimm@lists.01.org Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP NVDIMM DSM interface v1.6 added additional smart health fields. Updating the smart payload data structure accordingly. Signed-off-by: Dave Jiang --- include/uapi/linux/ndctl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 3f03567..5ca8628 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -25,6 +25,7 @@ struct nd_cmd_smart { #define ND_SMART_USED_VALID (1 << 2) #define ND_SMART_TEMP_VALID (1 << 3) #define ND_SMART_CTEMP_VALID (1 << 4) +#define ND_SMART_SHUTDOWN_COUNT_VALID (1 << 5) #define ND_SMART_ALARM_VALID (1 << 9) #define ND_SMART_SHUTDOWN_VALID (1 << 10) #define ND_SMART_VENDOR_VALID (1 << 11) @@ -44,7 +45,10 @@ struct nd_smart_payload { __u8 alarm_flags; __u16 temperature; __u16 ctrl_temperature; - __u8 reserved1[15]; + __u32 shutdown_count; + __u8 ait_status; + __u16 pmic_temperature; + __u8 reserved1[8]; __u8 shutdown_state; __u32 vendor_size; __u8 vendor_data[92];