diff options
author | Saeed Mahameed <saeedm@mellanox.com> | 2018-11-19 10:52:36 -0800 |
---|---|---|
committer | Leon Romanovsky <leonro@mellanox.com> | 2018-11-20 20:06:42 +0200 |
commit | c8e21b3b576b78fe1b07522aea046af2634a24e8 (patch) | |
tree | 297fb9d63b476455bec142f394c6ebcb09a3c229 /drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | |
parent | net/mlx5: EQ, Move all EQ logic to eq.c (diff) | |
download | linux-dev-c8e21b3b576b78fe1b07522aea046af2634a24e8.tar.xz linux-dev-c8e21b3b576b78fe1b07522aea046af2634a24e8.zip |
net/mlx5: EQ, Create all EQs in one place
Instead of creating the EQ table in three steps at driver load,
- allocate irq vectors
- allocate async EQs
- allocate completion EQs
Gather all of the procedures into one function in eq.c and call it from
driver load.
This will help us reduce the EQ and EQ table private structures
visibility to eq.c in downstream refactoring.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/debugfs.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c index 90fabd612b6c..b76766fb6c67 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c @@ -349,6 +349,16 @@ out: return param; } +static int mlx5_core_eq_query(struct mlx5_core_dev *dev, struct mlx5_eq *eq, + u32 *out, int outlen) +{ + u32 in[MLX5_ST_SZ_DW(query_eq_in)] = {}; + + MLX5_SET(query_eq_in, in, opcode, MLX5_CMD_OP_QUERY_EQ); + MLX5_SET(query_eq_in, in, eq_number, eq->eqn); + return mlx5_cmd_exec(dev, in, sizeof(in), out, outlen); +} + static u64 eq_read_field(struct mlx5_core_dev *dev, struct mlx5_eq *eq, int index) { |