RDMA/mlx5: Replace struct mlx5_core_mkey by u32 key
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / fpga / core.h
index 7e2e871dbf833b059d790bf161feb7264f2df093..2a984e82ae16ba53c5c4102c355afeffa9503ecf 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <linux/mlx5/eq.h>
 
+#include "mlx5_core.h"
 #include "lib/eq.h"
 #include "fpga/cmd.h"
 
@@ -53,7 +54,7 @@ struct mlx5_fpga_device {
        /* QP Connection resources */
        struct {
                u32 pdn;
-               struct mlx5_core_mkey mkey;
+               u32 mkey;
                struct mlx5_uars_page *uar;
        } conn_res;
 
@@ -62,26 +63,26 @@ struct mlx5_fpga_device {
 };
 
 #define mlx5_fpga_dbg(__adev, format, ...) \
-       dev_dbg(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
-                __func__, __LINE__, current->pid, ##__VA_ARGS__)
+       mlx5_core_dbg((__adev)->mdev, "FPGA: %s:%d:(pid %d): " format, \
+                      __func__, __LINE__, current->pid, ##__VA_ARGS__)
 
 #define mlx5_fpga_err(__adev, format, ...) \
-       dev_err(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
-               __func__, __LINE__, current->pid, ##__VA_ARGS__)
+       mlx5_core_err((__adev)->mdev, "FPGA: %s:%d:(pid %d): " format, \
+                     __func__, __LINE__, current->pid, ##__VA_ARGS__)
 
 #define mlx5_fpga_warn(__adev, format, ...) \
-       dev_warn(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \
-               __func__, __LINE__, current->pid, ##__VA_ARGS__)
+       mlx5_core_warn((__adev)->mdev, "FPGA: %s:%d:(pid %d): " format, \
+                      __func__, __LINE__, current->pid, ##__VA_ARGS__)
 
 #define mlx5_fpga_warn_ratelimited(__adev, format, ...) \
-       dev_warn_ratelimited(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d: " \
-               format, __func__, __LINE__, ##__VA_ARGS__)
+       mlx5_core_err_rl((__adev)->mdev, "FPGA: %s:%d: " \
+                        format, __func__, __LINE__, ##__VA_ARGS__)
 
 #define mlx5_fpga_notice(__adev, format, ...) \
-       dev_notice(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__)
+       mlx5_core_info((__adev)->mdev, "FPGA: " format, ##__VA_ARGS__)
 
 #define mlx5_fpga_info(__adev, format, ...) \
-       dev_info(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__)
+       mlx5_core_info((__adev)->mdev, "FPGA: " format, ##__VA_ARGS__)
 
 int mlx5_fpga_init(struct mlx5_core_dev *mdev);
 void mlx5_fpga_cleanup(struct mlx5_core_dev *mdev);