Commit 266c7bf5 authored by Dave Jiang's avatar Dave Jiang Committed by Dan Williams

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: 3c13e2ac ("...Add test support for Intel nvdimm security DSMs")
Reported-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 49a57857
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment