Lines Matching refs:nvdimm

331 struct nvdimm_bus *nvdimm_to_bus(struct nvdimm *nvdimm)  in nvdimm_to_bus()  argument
333 return to_nvdimm_bus(nvdimm->dev.parent); in nvdimm_to_bus()
396 struct nvdimm *nvdimm = to_nvdimm(dev); in child_unregister() local
401 set_bit(NVDIMM_SECURITY_FROZEN, &nvdimm->sec.flags); in child_unregister()
402 if (test_and_clear_bit(NDD_WORK_PENDING, &nvdimm->flags)) in child_unregister()
405 cancel_delayed_work_sync(&nvdimm->dwork); in child_unregister()
818 u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_in_size() argument
827 if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA && idx == 2) { in nd_cmd_in_size()
831 } else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) { in nd_cmd_in_size()
845 u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_out_size() argument
855 if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA && idx == 1) in nd_cmd_out_size()
857 else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) in nd_cmd_out_size()
859 else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) { in nd_cmd_out_size()
951 struct nvdimm *nvdimm, unsigned int cmd, void *data) in nd_cmd_clear_to_send() argument
957 int rc = nd_desc->clear_to_send(nd_desc, nvdimm, cmd, data); in nd_cmd_clear_to_send()
964 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR) in nd_cmd_clear_to_send()
968 if (!nvdimm || cmd != ND_CMD_SET_CONFIG_DATA) in nd_cmd_clear_to_send()
973 if (atomic_read(&nvdimm->busy)) in nd_cmd_clear_to_send()
978 static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, in __nd_ioctl() argument
996 if (nvdimm) { in __nd_ioctl()
999 cmd_mask = nvdimm->cmd_mask; in __nd_ioctl()
1000 dimm_name = dev_name(&nvdimm->dev); in __nd_ioctl()
1026 nvdimm ? nvdimm_cmd_name(cmd) in __nd_ioctl()
1040 in_size = nd_cmd_in_size(nvdimm, cmd, desc, i, in_env); in __nd_ioctl()
1073 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, in __nd_ioctl()
1116 rc = nd_cmd_clear_to_send(nvdimm_bus, nvdimm, func, buf); in __nd_ioctl()
1120 rc = nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, &cmd_rc); in __nd_ioctl()
1124 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR && cmd_rc >= 0) { in __nd_ioctl()
1154 struct nvdimm *nvdimm = to_nvdimm(dev); in match_dimm() local
1156 return nvdimm->id == id; in match_dimm()
1168 struct nvdimm *nvdimm = NULL; in nd_ioctl() local
1181 nvdimm = to_nvdimm(dev); in nd_ioctl()
1198 rc = __nd_ioctl(nvdimm_bus, nvdimm, ro, cmd, arg); in nd_ioctl()
1200 if (nvdimm) in nd_ioctl()
1201 put_device(&nvdimm->dev); in nd_ioctl()