net/mlx5: Limit scope of dump_fill_mkey function
authorYonatan Cohen <yonatanc@mellanox.com>
Tue, 19 Jun 2018 05:47:22 +0000 (08:47 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Wed, 4 Jul 2018 18:51:07 +0000 (21:51 +0300)
mlx5_core_dump_fill_mkey() is going to be used in next
patch in IB and doesn't need to be visible to whole
mlx5_core. Move that command to mlx5_ib.

Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/net/ethernet/mellanox/mlx5/core/mr.c
include/linux/mlx5/driver.h

index 188512bf46e63210e478a0527bc225c075dcf28a..ccc0b5d06a7df7bd4917ac17b95faab051621959 100644 (file)
 
 #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)] = {};
index e7206c8a8011b273581d290f9d751a84ec8a94e6..98ea4648c655a62f6240803893efcdcb7fe20ac5 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/kernel.h>
 #include <linux/mlx5/driver.h>
 
+int mlx5_cmd_dump_fill_mkey(struct mlx5_core_dev *dev, u32 *mkey);
 int mlx5_cmd_null_mkey(struct mlx5_core_dev *dev, u32 *null_mkey);
 int mlx5_cmd_query_cong_params(struct mlx5_core_dev *dev, int cong_point,
                               void *out, int out_size);
index f4f02f775c93869ba978ec6dc9be8dd62d7d99a9..0670165afd5fda40aaf1f0a9dc54e570210f9739 100644 (file)
@@ -146,23 +146,6 @@ int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mkey *mkey,
 }
 EXPORT_SYMBOL(mlx5_core_query_mkey);
 
-int mlx5_core_dump_fill_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mkey *_mkey,
-                            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;
-}
-EXPORT_SYMBOL(mlx5_core_dump_fill_mkey);
-
 static inline u32 mlx5_get_psv(u32 *out, int psv_index)
 {
        switch (psv_index) {
index 80cbb7fdce4a1a9afea00cc7dbfbe16249871b2d..1cb1c0317b7788a5928b2f3411171d7f655ffbb0 100644 (file)
@@ -1067,8 +1067,6 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev,
                           struct mlx5_core_mkey *mkey);
 int mlx5_core_query_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mkey *mkey,
                         u32 *out, int outlen);
-int mlx5_core_dump_fill_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mkey *_mkey,
-                            u32 *mkey);
 int mlx5_core_alloc_pd(struct mlx5_core_dev *dev, u32 *pdn);
 int mlx5_core_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn);
 int mlx5_core_mad_ifc(struct mlx5_core_dev *dev, const void *inb, void *outb,