hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/ethernet/mellanox/mlx5/core/mcg.c
....@@ -33,34 +33,31 @@
3333 #include <linux/kernel.h>
3434 #include <linux/module.h>
3535 #include <linux/mlx5/driver.h>
36
-#include <linux/mlx5/cmd.h>
3736 #include <rdma/ib_verbs.h>
3837 #include "mlx5_core.h"
3938
4039 int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn)
4140 {
42
- u32 out[MLX5_ST_SZ_DW(attach_to_mcg_out)] = {0};
43
- u32 in[MLX5_ST_SZ_DW(attach_to_mcg_in)] = {0};
41
+ u32 in[MLX5_ST_SZ_DW(attach_to_mcg_in)] = {};
4442 void *gid;
4543
4644 MLX5_SET(attach_to_mcg_in, in, opcode, MLX5_CMD_OP_ATTACH_TO_MCG);
4745 MLX5_SET(attach_to_mcg_in, in, qpn, qpn);
4846 gid = MLX5_ADDR_OF(attach_to_mcg_in, in, multicast_gid);
4947 memcpy(gid, mgid, sizeof(*mgid));
50
- return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
48
+ return mlx5_cmd_exec_in(dev, attach_to_mcg, in);
5149 }
5250 EXPORT_SYMBOL(mlx5_core_attach_mcg);
5351
5452 int mlx5_core_detach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn)
5553 {
56
- u32 out[MLX5_ST_SZ_DW(detach_from_mcg_out)] = {0};
57
- u32 in[MLX5_ST_SZ_DW(detach_from_mcg_in)] = {0};
54
+ u32 in[MLX5_ST_SZ_DW(detach_from_mcg_in)] = {};
5855 void *gid;
5956
6057 MLX5_SET(detach_from_mcg_in, in, opcode, MLX5_CMD_OP_DETACH_FROM_MCG);
6158 MLX5_SET(detach_from_mcg_in, in, qpn, qpn);
6259 gid = MLX5_ADDR_OF(detach_from_mcg_in, in, multicast_gid);
6360 memcpy(gid, mgid, sizeof(*mgid));
64
- return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
61
+ return mlx5_cmd_exec_in(dev, detach_from_mcg, in);
6562 }
6663 EXPORT_SYMBOL(mlx5_core_detach_mcg);