Lines Matching refs:nvdimm

336 struct nvdimm_bus *nvdimm_to_bus(struct nvdimm *nvdimm)  in nvdimm_to_bus()  argument
338 return to_nvdimm_bus(nvdimm->dev.parent); in nvdimm_to_bus()
401 struct nvdimm *nvdimm = to_nvdimm(dev); in child_unregister() local
406 set_bit(NVDIMM_SECURITY_FROZEN, &nvdimm->sec.flags); in child_unregister()
407 if (test_and_clear_bit(NDD_WORK_PENDING, &nvdimm->flags)) in child_unregister()
410 cancel_delayed_work_sync(&nvdimm->dwork); in child_unregister()
847 u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_in_size() argument
856 if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA && idx == 2) { in nd_cmd_in_size()
860 } else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) { in nd_cmd_in_size()
874 u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_out_size() argument
884 if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA && idx == 1) in nd_cmd_out_size()
886 else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) in nd_cmd_out_size()
888 else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) { in nd_cmd_out_size()
980 struct nvdimm *nvdimm, unsigned int cmd, void *data) in nd_cmd_clear_to_send() argument
986 int rc = nd_desc->clear_to_send(nd_desc, nvdimm, cmd, data); in nd_cmd_clear_to_send()
993 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR) in nd_cmd_clear_to_send()
997 if (!nvdimm || cmd != ND_CMD_SET_CONFIG_DATA) in nd_cmd_clear_to_send()
1002 if (atomic_read(&nvdimm->busy)) in nd_cmd_clear_to_send()
1007 static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm, in __nd_ioctl() argument
1025 if (nvdimm) { in __nd_ioctl()
1028 cmd_mask = nvdimm->cmd_mask; in __nd_ioctl()
1029 dimm_name = dev_name(&nvdimm->dev); in __nd_ioctl()
1044 if (nvdimm) { in __nd_ioctl()
1073 nvdimm ? nvdimm_cmd_name(cmd) in __nd_ioctl()
1087 in_size = nd_cmd_in_size(nvdimm, cmd, desc, i, in_env); in __nd_ioctl()
1120 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, in __nd_ioctl()
1163 rc = nd_cmd_clear_to_send(nvdimm_bus, nvdimm, func, buf); in __nd_ioctl()
1167 rc = nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, &cmd_rc); in __nd_ioctl()
1171 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR && cmd_rc >= 0) { in __nd_ioctl()
1201 struct nvdimm *nvdimm = to_nvdimm(dev); in match_dimm() local
1203 return nvdimm->id == id; in match_dimm()
1215 struct nvdimm *nvdimm = NULL; in nd_ioctl() local
1228 nvdimm = to_nvdimm(dev); in nd_ioctl()
1245 rc = __nd_ioctl(nvdimm_bus, nvdimm, ro, cmd, arg); in nd_ioctl()
1247 if (nvdimm) in nd_ioctl()
1248 put_device(&nvdimm->dev); in nd_ioctl()