Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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: