summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-04-05 20:40:52 -0400
committerDan Williams <dan.j.williams@intel.com>2016-04-11 14:11:14 -0400
commitbaa51277cf5dc844089ea2f6e0f78b1c5ca665d8 (patch)
tree8465d2953b073cac146c4b11540ec3dbbe4b1f66 /drivers/nvdimm
parent8cc6ddfcafbb7e32ff025f7d9551ecf9649c12cd (diff)
libnvdimm, test: add mock SMART data payload
Provide simulated SMART data to enable the ndctl implementation of SMART data retrieval and parsing. The payload is defined here, "Section 4.1 SMART and Health Info (Function Index 1)": http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index 19f822d7f652..8111b1299515 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -783,6 +783,9 @@ int __init nvdimm_bus_init(void)
783{ 783{
784 int rc; 784 int rc;
785 785
786 BUILD_BUG_ON(sizeof(struct nd_smart_payload) != 128);
787 BUILD_BUG_ON(sizeof(struct nd_smart_threshold_payload) != 8);
788
786 rc = bus_register(&nvdimm_bus_type); 789 rc = bus_register(&nvdimm_bus_type);
787 if (rc) 790 if (rc)
788 return rc; 791 return rc;