diff options
author | Saeed Mahameed <saeedm@mellanox.com> | 2018-07-23 14:58:46 -0700 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-07-23 14:58:46 -0700 |
commit | 7854ac44fe86548f8a6c6001938a1a2593b255e4 (patch) | |
tree | dc0a0fb20902d4c25c9a39b1a14679ce9faa7738 /drivers/infiniband/hw/mlx5/cmd.c | |
parent | c9eaaa1773982e30fcb6e9f2e2db878490c0f730 (diff) | |
parent | 048f31437ac5da336cf08e13f5fdc8add6a9bb16 (diff) | |
download | linux-7854ac44fe86548f8a6c6001938a1a2593b255e4.tar.gz linux-7854ac44fe86548f8a6c6001938a1a2593b255e4.tar.bz2 linux-7854ac44fe86548f8a6c6001938a1a2593b255e4.zip |
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
mlx5 core infrastructure updates and fixes.
From Eran:
- Add MPEGC (Management PCIe General Configuration) registers and btis
- Fix tristate and description for MLX5 module
rom Feras:
- Add hardware structures for the firmware tracer
From Jainbo:
- Core support for double vlan push/pop steering action
From Max:
- Add XRQ commands definitions
From Noa:
- Add missing SET_DRIVER_VERSION command translation
From Roi:
- Use ERR_CAST() instead of coding it
From Tariq:
- Better return types for CQE API
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/cmd.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/cmd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/cmd.c b/drivers/infiniband/hw/mlx5/cmd.c index 188512bf46e6..ccc0b5d06a7d 100644 --- a/drivers/infiniband/hw/mlx5/cmd.c +++ b/drivers/infiniband/hw/mlx5/cmd.c @@ -32,6 +32,21 @@ #include "cmd.h" +int mlx5_cmd_dump_fill_mkey(struct mlx5_core_dev *dev, u32 *mkey) +{ + u32 out[MLX5_ST_SZ_DW(query_special_contexts_out)] = {0}; + u32 in[MLX5_ST_SZ_DW(query_special_contexts_in)] = {0}; + int err; + + MLX5_SET(query_special_contexts_in, in, opcode, + MLX5_CMD_OP_QUERY_SPECIAL_CONTEXTS); + err = mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out)); + if (!err) + *mkey = MLX5_GET(query_special_contexts_out, out, + dump_fill_mkey); + return err; +} + int mlx5_cmd_null_mkey(struct mlx5_core_dev *dev, u32 *null_mkey) { u32 out[MLX5_ST_SZ_DW(query_special_contexts_out)] = {}; |