All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libnvdimm: add smart payload fields added in DSM 1.6
@ 2017-10-11 17:57 Dave Jiang
  2017-10-11 18:01 ` Dan Williams
  2017-10-28 23:20 ` Dan Williams
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Jiang @ 2017-10-11 17:57 UTC (permalink / raw)
  To: dan.j.williams; +Cc: piotr.balcer, linux-nvdimm

NVDIMM DSM interface v1.6 added additional smart health fields. Updating the
smart payload data structure accordingly.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 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];

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libnvdimm: add smart payload fields added in DSM 1.6
  2017-10-11 17:57 [PATCH] libnvdimm: add smart payload fields added in DSM 1.6 Dave Jiang
@ 2017-10-11 18:01 ` Dan Williams
  2017-10-13 23:13   ` Jerry Hoemann
  2017-10-28 23:20 ` Dan Williams
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Williams @ 2017-10-11 18:01 UTC (permalink / raw)
  To: Dave Jiang; +Cc: Balcer, Piotr, linux-nvdimm

On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote:
> NVDIMM DSM interface v1.6 added additional smart health fields. Updating the
> smart payload data structure accordingly.

I'll also add a note when I merge this that the only reason we are
maintaining this structure in the kernel is in case we want to
translate 3rd party SMART payload formats into the ND_IOCTL_SMART
format. Outside of that we could just delete this since ndctl is
already doing that translation.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libnvdimm: add smart payload fields added in DSM 1.6
  2017-10-11 18:01 ` Dan Williams
@ 2017-10-13 23:13   ` Jerry Hoemann
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry Hoemann @ 2017-10-13 23:13 UTC (permalink / raw)
  To: Dan Williams; +Cc: Balcer, Piotr, linux-nvdimm

On Wed, Oct 11, 2017 at 11:01:26AM -0700, Dan Williams wrote:
> On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote:
> > NVDIMM DSM interface v1.6 added additional smart health fields. Updating the
> > smart payload data structure accordingly.
> 
> I'll also add a note when I merge this that the only reason we are
> maintaining this structure in the kernel is in case we want to
> translate 3rd party SMART payload formats into the ND_IOCTL_SMART
> format. Outside of that we could just delete this since ndctl is
> already doing that translation.


Dan,

Function 2, Get Smart Threshold, in v1.6 is also different from what
Linux implemented in ndctl.h.  But, these changes don't appear to be
backward compatible.

Do you have plans for this?

Jerry

-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libnvdimm: add smart payload fields added in DSM 1.6
  2017-10-11 17:57 [PATCH] libnvdimm: add smart payload fields added in DSM 1.6 Dave Jiang
  2017-10-11 18:01 ` Dan Williams
@ 2017-10-28 23:20 ` Dan Williams
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Williams @ 2017-10-28 23:20 UTC (permalink / raw)
  To: Dave Jiang; +Cc: Balcer, Piotr, linux-nvdimm

On Wed, Oct 11, 2017 at 10:57 AM, Dave Jiang <dave.jiang@intel.com> wrote:
> NVDIMM DSM interface v1.6 added additional smart health fields. Updating the
> smart payload data structure accordingly.

I've thought about this a bit more and given the fact that this is out
of date and the SMART threshold payload has changed in an incompatible
manner in the latest spec, I'm going to deprecate these payloads. The
threshold breakage is unfortunate but given the thresholds can not be
set until support for the new 'set threshold' dsm the impact is
limited. We'll leave these payloads in the kernel until there are no
versions of ndctl shipping in distributions that depend on them.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-28 23:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 17:57 [PATCH] libnvdimm: add smart payload fields added in DSM 1.6 Dave Jiang
2017-10-11 18:01 ` Dan Williams
2017-10-13 23:13   ` Jerry Hoemann
2017-10-28 23:20 ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.