Lines Matching refs:cmd

815 const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd)  in nd_cmd_dimm_desc()  argument
817 if (cmd < ARRAY_SIZE(__nd_cmd_dimm_descs)) in nd_cmd_dimm_desc()
818 return &__nd_cmd_dimm_descs[cmd]; in nd_cmd_dimm_desc()
855 const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd) in nd_cmd_bus_desc() argument
857 if (cmd < ARRAY_SIZE(__nd_cmd_bus_descs)) in nd_cmd_bus_desc()
858 return &__nd_cmd_bus_descs[cmd]; in nd_cmd_bus_desc()
863 u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_in_size() argument
872 if (nvdimm && cmd == ND_CMD_SET_CONFIG_DATA && idx == 2) { in nd_cmd_in_size()
876 } else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) { in nd_cmd_in_size()
880 } else if (cmd == ND_CMD_CALL) { in nd_cmd_in_size()
890 u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd, in nd_cmd_out_size() argument
900 if (nvdimm && cmd == ND_CMD_GET_CONFIG_DATA && idx == 1) in nd_cmd_out_size()
902 else if (nvdimm && cmd == ND_CMD_VENDOR && idx == 2) in nd_cmd_out_size()
904 else if (!nvdimm && cmd == ND_CMD_ARS_STATUS && idx == 2) { in nd_cmd_out_size()
921 } else if (cmd == ND_CMD_CALL) { in nd_cmd_out_size()
996 struct nvdimm *nvdimm, unsigned int cmd, void *data) in nd_cmd_clear_to_send() argument
1002 int rc = nd_desc->clear_to_send(nd_desc, nvdimm, cmd, data); in nd_cmd_clear_to_send()
1009 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR) in nd_cmd_clear_to_send()
1013 if (!nvdimm || cmd != ND_CMD_SET_CONFIG_DATA) in nd_cmd_clear_to_send()
1028 unsigned int cmd = _IOC_NR(ioctl_cmd); in __nd_ioctl() local
1034 unsigned int func = cmd; in __nd_ioctl()
1042 desc = nd_cmd_dimm_desc(cmd); in __nd_ioctl()
1043 cmd_name = nvdimm_cmd_name(cmd); in __nd_ioctl()
1047 desc = nd_cmd_bus_desc(cmd); in __nd_ioctl()
1048 cmd_name = nvdimm_bus_cmd_name(cmd); in __nd_ioctl()
1054 if (cmd == ND_CMD_CALL) { in __nd_ioctl()
1076 cmd > ND_CMD_CALL || in __nd_ioctl()
1077 !test_bit(cmd, &cmd_mask)) in __nd_ioctl()
1082 switch (cmd) { in __nd_ioctl()
1089 nvdimm ? nvdimm_cmd_name(cmd) in __nd_ioctl()
1090 : nvdimm_bus_cmd_name(cmd)); in __nd_ioctl()
1103 in_size = nd_cmd_in_size(nvdimm, cmd, desc, i, in_env); in __nd_ioctl()
1121 if (cmd == ND_CMD_CALL) { in __nd_ioctl()
1136 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, in __nd_ioctl()
1183 rc = nd_desc->ndctl(nd_desc, nvdimm, cmd, buf, buf_len, &cmd_rc); in __nd_ioctl()
1187 if (!nvdimm && cmd == ND_CMD_CLEAR_ERROR && cmd_rc >= 0) { in __nd_ioctl()
1225 static long nd_ioctl(struct file *file, unsigned int cmd, unsigned long arg, in nd_ioctl() argument
1261 rc = __nd_ioctl(nvdimm_bus, nvdimm, ro, cmd, arg); in nd_ioctl()
1271 static long bus_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in bus_ioctl() argument
1273 return nd_ioctl(file, cmd, arg, BUS_IOCTL); in bus_ioctl()
1276 static long dimm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in dimm_ioctl() argument
1278 return nd_ioctl(file, cmd, arg, DIMM_IOCTL); in dimm_ioctl()