Lines Matching defs:in

7  * COPYING in the main directory of this source tree, or the
10 * Redistribution and use in source and binary forms, with or
18 * - Redistributions in binary form must reproduce the above
20 * disclaimer in the documentation and/or other materials
92 static u16 in_to_opcode(void *in)
94 return MLX5_GET(mbox_in, in, opcode);
114 cmd_alloc_ent(struct mlx5_cmd *cmd, struct mlx5_cmd_msg *in,
126 ent->in = in;
134 ent->op = in_to_opcode(in->first.data);
271 calc_chain_sig(ent->in);
815 static void cmd_status_print(struct mlx5_core_dev *dev, void *in, void *out)
820 opcode = in_to_opcode(in);
821 op_mod = MLX5_GET(mbox_in, in, op_mod);
822 uid = MLX5_GET(mbox_in, in, uid);
829 int mlx5_cmd_check(struct mlx5_core_dev *dev, int err, void *in, void *out)
833 u16 opcode = in_to_opcode(in);
852 cmd_status_print(dev, in, out);
861 struct mlx5_cmd_msg *msg = input ? ent->in : ent->out;
885 dump_buf(ent->lay->in, sizeof(ent->lay->in), 1, offset, ent->idx);
886 offset += sizeof(ent->lay->in);
989 free_msg(dev, ent->in);
1004 free_msg(dev, ent->in);
1027 memcpy(lay->in, ent->in->first.data, sizeof(lay->in));
1028 if (ent->in->next)
1029 lay->in_ptr = cpu_to_be64(ent->in->next->dma);
1030 lay->inlen = cpu_to_be32(ent->in->len);
1058 /* if not in polling don't use ent after this point */
1193 * return value in case (!callback):
1198 * return value in case (callback):
1203 static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
1219 ent = cmd_alloc_ent(cmd, in, out, uout, uout_size,
1587 debugfs_create_file("in", 0400, dbg->dbg_root, dev, &dfops);
1739 if (err > 0) /* Failed in FW, command didn't execute */
1748 free_msg(dev, ent->in);
1780 * to guarantee pending commands will not get freed in the meanwhile.
1859 static int is_manage_pages(void *in)
1861 return in_to_opcode(in) == MLX5_CMD_OP_MANAGE_PAGES;
1868 static int cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
1873 u16 opcode = in_to_opcode(in);
1891 pages_queue = is_manage_pages(in);
1902 err = mlx5_copy_to_msg(inb, in, in_size, token);
1919 if (err > 0) /* Failed in FW, command didn't execute */
1997 * @in: inbox mlx5_ifc command buffer
2008 int mlx5_cmd_do(struct mlx5_core_dev *dev, void *in, int in_size, void *out, int out_size)
2010 int err = cmd_exec(dev, in, in_size, out, out_size, NULL, NULL, false);
2011 u16 op_mod = MLX5_GET(mbox_in, in, op_mod);
2012 u16 opcode = in_to_opcode(in);
2022 * @in: inbox mlx5_ifc command buffer
2030 int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
2033 int err = mlx5_cmd_do(dev, in, in_size, out, out_size);
2035 return mlx5_cmd_check(dev, err, in, out);
2045 * @in: inbox mlx5_ifc command buffer
2053 int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size,
2056 int err = cmd_exec(dev, in, in_size, out, out_size, NULL, NULL, true);
2057 u16 op_mod = MLX5_GET(mbox_in, in, op_mod);
2058 u16 opcode = in_to_opcode(in);
2061 return mlx5_cmd_check(dev, err, in, out);
2102 int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size,
2110 work->opcode = in_to_opcode(in);
2111 work->op_mod = MLX5_GET(mbox_in, in, op_mod);
2115 ret = cmd_exec(ctx->dev, in, in_size, out, out_size,
2128 u32 in[MLX5_ST_SZ_DW(allow_other_vhca_access_in)] = {};
2132 in, opcode, MLX5_CMD_OP_ALLOW_OTHER_VHCA_ACCESS);
2134 in, object_type_to_be_accessed, attr->obj_type);
2136 in, object_id_to_be_accessed, attr->obj_id);
2138 key = MLX5_ADDR_OF(allow_other_vhca_access_in, in, access_key);
2141 return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
2149 u32 in[MLX5_ST_SZ_DW(create_alias_obj_in)] = {};
2155 attr = MLX5_ADDR_OF(create_alias_obj_in, in, hdr);
2160 param = MLX5_ADDR_OF(general_obj_in_cmd_hdr, in, op_param);
2163 attr = MLX5_ADDR_OF(create_alias_obj_in, in, alias_ctx);
2170 ret = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
2183 u32 in[MLX5_ST_SZ_DW(general_obj_in_cmd_hdr)] = {};
2185 MLX5_SET(general_obj_in_cmd_hdr, in, opcode, MLX5_CMD_OP_DESTROY_GENERAL_OBJECT);
2186 MLX5_SET(general_obj_in_cmd_hdr, in, obj_type, obj_type);
2187 MLX5_SET(general_obj_in_cmd_hdr, in, obj_id, obj_id);
2189 return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));