.. | .. |
---|
33 | 33 | #include <linux/kernel.h> |
---|
34 | 34 | #include <linux/module.h> |
---|
35 | 35 | #include <linux/mlx5/driver.h> |
---|
36 | | -#include <linux/mlx5/cmd.h> |
---|
37 | 36 | #include <rdma/ib_verbs.h> |
---|
38 | 37 | #include "mlx5_core.h" |
---|
39 | 38 | |
---|
40 | 39 | int mlx5_core_attach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn) |
---|
41 | 40 | { |
---|
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)] = {}; |
---|
44 | 42 | void *gid; |
---|
45 | 43 | |
---|
46 | 44 | MLX5_SET(attach_to_mcg_in, in, opcode, MLX5_CMD_OP_ATTACH_TO_MCG); |
---|
47 | 45 | MLX5_SET(attach_to_mcg_in, in, qpn, qpn); |
---|
48 | 46 | gid = MLX5_ADDR_OF(attach_to_mcg_in, in, multicast_gid); |
---|
49 | 47 | 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); |
---|
51 | 49 | } |
---|
52 | 50 | EXPORT_SYMBOL(mlx5_core_attach_mcg); |
---|
53 | 51 | |
---|
54 | 52 | int mlx5_core_detach_mcg(struct mlx5_core_dev *dev, union ib_gid *mgid, u32 qpn) |
---|
55 | 53 | { |
---|
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)] = {}; |
---|
58 | 55 | void *gid; |
---|
59 | 56 | |
---|
60 | 57 | MLX5_SET(detach_from_mcg_in, in, opcode, MLX5_CMD_OP_DETACH_FROM_MCG); |
---|
61 | 58 | MLX5_SET(detach_from_mcg_in, in, qpn, qpn); |
---|
62 | 59 | gid = MLX5_ADDR_OF(detach_from_mcg_in, in, multicast_gid); |
---|
63 | 60 | 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); |
---|
65 | 62 | } |
---|
66 | 63 | EXPORT_SYMBOL(mlx5_core_detach_mcg); |
---|