summaryrefslogtreecommitdiff
path: root/tools/testing/nvdimm
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2019-01-14 18:41:04 -0700
committerDan Williams <dan.j.williams@intel.com>2019-01-21 09:56:29 -0800
commit266c7bf52a7fe5cb5a97e78fedcaac629378008f (patch)
tree71f0476d8e20c65090877c8e3fbff745a830dcb6 /tools/testing/nvdimm
parent49a57857aeea06ca831043acbb0fa5e0f50602fd (diff)
downloadlwn-266c7bf52a7fe5cb5a97e78fedcaac629378008f.tar.gz
lwn-266c7bf52a7fe5cb5a97e78fedcaac629378008f.zip
nfit_test: fix security state pull for nvdimm security nfit_test
The override status function needs to be updated to use the proper request parameter in order to get the security state. Fixes: 3c13e2ac747a ("...Add test support for Intel nvdimm security DSMs") Reported-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing/nvdimm')
-rw-r--r--tools/testing/nvdimm/dimm_devs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/nvdimm/dimm_devs.c b/tools/testing/nvdimm/dimm_devs.c
index e75238404555..2d4baf57822f 100644
--- a/tools/testing/nvdimm/dimm_devs.c
+++ b/tools/testing/nvdimm/dimm_devs.c
@@ -18,8 +18,8 @@ ssize_t security_show(struct device *dev,
* For the test version we need to poll the "hardware" in order
* to get the updated status for unlock testing.
*/
- nvdimm->sec.state = nvdimm_security_state(nvdimm, false);
- nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, true);
+ nvdimm->sec.state = nvdimm_security_state(nvdimm, NVDIMM_USER);
+ nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, NVDIMM_MASTER);
switch (nvdimm->sec.state) {
case NVDIMM_SECURITY_DISABLED: