Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dave Jiang and committed by
Dan Williams
266c7bf5 49a57857

+2 -2
+2 -2
tools/testing/nvdimm/dimm_devs.c
··· 18 18 * For the test version we need to poll the "hardware" in order 19 19 * to get the updated status for unlock testing. 20 20 */ 21 - nvdimm->sec.state = nvdimm_security_state(nvdimm, false); 22 - nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, true); 21 + nvdimm->sec.state = nvdimm_security_state(nvdimm, NVDIMM_USER); 22 + nvdimm->sec.ext_state = nvdimm_security_state(nvdimm, NVDIMM_MASTER); 23 23 24 24 switch (nvdimm->sec.state) { 25 25 case NVDIMM_SECURITY_DISABLED: