| .. | .. |
|---|
| 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 "mlx5_core.h" |
|---|
| 38 | 37 | |
|---|
| 39 | 38 | int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn) |
|---|
| 40 | 39 | { |
|---|
| 41 | | - u32 out[MLX5_ST_SZ_DW(alloc_pd_out)] = {0}; |
|---|
| 42 | | - u32 in[MLX5_ST_SZ_DW(alloc_pd_in)] = {0}; |
|---|
| 40 | + u32 out[MLX5_ST_SZ_DW(alloc_pd_out)] = {}; |
|---|
| 41 | + u32 in[MLX5_ST_SZ_DW(alloc_pd_in)] = {}; |
|---|
| 43 | 42 | int err; |
|---|
| 44 | 43 | |
|---|
| 45 | 44 | MLX5_SET(alloc_pd_in, in, opcode, MLX5_CMD_OP_ALLOC_PD); |
|---|
| 46 | | - err = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); |
|---|
| 45 | + err = mlx5_cmd_exec_inout(dev, alloc_pd, in, out); |
|---|
| 47 | 46 | if (!err) |
|---|
| 48 | 47 | *pdn = MLX5_GET(alloc_pd_out, out, pd); |
|---|
| 49 | 48 | return err; |
|---|
| .. | .. |
|---|
| 52 | 51 | |
|---|
| 53 | 52 | int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn) |
|---|
| 54 | 53 | { |
|---|
| 55 | | - u32 out[MLX5_ST_SZ_DW(dealloc_pd_out)] = {0}; |
|---|
| 56 | | - u32 in[MLX5_ST_SZ_DW(dealloc_pd_in)] = {0}; |
|---|
| 54 | + u32 in[MLX5_ST_SZ_DW(dealloc_pd_in)] = {}; |
|---|
| 57 | 55 | |
|---|
| 58 | 56 | MLX5_SET(dealloc_pd_in, in, opcode, MLX5_CMD_OP_DEALLOC_PD); |
|---|
| 59 | 57 | MLX5_SET(dealloc_pd_in, in, pd, pdn); |
|---|
| 60 | | - return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); |
|---|
| 58 | + return mlx5_cmd_exec_in(dev, dealloc_pd, in); |
|---|
| 61 | 59 | } |
|---|
| 62 | 60 | EXPORT_SYMBOL(mlx5_core_dealloc_pd); |
|---|