Lines Matching refs:nd_cmd
18 } nd_cmd = { in intel_security_flags() local
41 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_flags()
42 if (rc < 0 || nd_cmd.cmd.status) { in intel_security_flags()
44 nvdimm_name(nvdimm), rc, nd_cmd.cmd.status); in intel_security_flags()
50 if (nd_cmd.cmd.extended_state & ND_INTEL_SEC_ESTATE_ENABLED) in intel_security_flags()
54 if (nd_cmd.cmd.extended_state & ND_INTEL_SEC_ESTATE_PLIMIT) in intel_security_flags()
59 if (nd_cmd.cmd.state & ND_INTEL_SEC_STATE_UNSUPPORTED) in intel_security_flags()
62 if (nd_cmd.cmd.state & ND_INTEL_SEC_STATE_ENABLED) { in intel_security_flags()
63 if (nd_cmd.cmd.state & ND_INTEL_SEC_STATE_FROZEN || in intel_security_flags()
64 nd_cmd.cmd.state & ND_INTEL_SEC_STATE_PLIMIT) in intel_security_flags()
67 if (nd_cmd.cmd.state & ND_INTEL_SEC_STATE_LOCKED) in intel_security_flags()
83 } nd_cmd = { in intel_security_freeze() local
96 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_freeze()
99 if (nd_cmd.cmd.status) in intel_security_freeze()
116 } nd_cmd = { in intel_security_change_key() local
130 memcpy(nd_cmd.cmd.old_pass, old_data->data, in intel_security_change_key()
131 sizeof(nd_cmd.cmd.old_pass)); in intel_security_change_key()
132 memcpy(nd_cmd.cmd.new_pass, new_data->data, in intel_security_change_key()
133 sizeof(nd_cmd.cmd.new_pass)); in intel_security_change_key()
134 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_change_key()
138 switch (nd_cmd.cmd.status) { in intel_security_change_key()
160 } nd_cmd = { in intel_security_unlock() local
174 memcpy(nd_cmd.cmd.passphrase, key_data->data, in intel_security_unlock()
175 sizeof(nd_cmd.cmd.passphrase)); in intel_security_unlock()
176 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_unlock()
179 switch (nd_cmd.cmd.status) { in intel_security_unlock()
202 } nd_cmd = { in intel_security_disable() local
215 memcpy(nd_cmd.cmd.passphrase, key_data->data, in intel_security_disable()
216 sizeof(nd_cmd.cmd.passphrase)); in intel_security_disable()
217 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_disable()
221 switch (nd_cmd.cmd.status) { in intel_security_disable()
245 } nd_cmd = { in intel_security_erase() local
260 memcpy(nd_cmd.cmd.passphrase, key->data, in intel_security_erase()
261 sizeof(nd_cmd.cmd.passphrase)); in intel_security_erase()
262 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_erase()
266 switch (nd_cmd.cmd.status) { in intel_security_erase()
290 } nd_cmd = { in intel_security_query_overwrite() local
302 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_query_overwrite()
306 switch (nd_cmd.cmd.status) { in intel_security_query_overwrite()
328 } nd_cmd = { in intel_security_overwrite() local
343 memcpy(nd_cmd.cmd.passphrase, nkey->data, in intel_security_overwrite()
344 sizeof(nd_cmd.cmd.passphrase)); in intel_security_overwrite()
345 rc = nvdimm_ctl(nvdimm, ND_CMD_CALL, &nd_cmd, sizeof(nd_cmd), NULL); in intel_security_overwrite()
349 switch (nd_cmd.cmd.status) { in intel_security_overwrite()