RDMA/mlx5: Replace struct mlx5_core_mkey by u32 key
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / fpga / conn.c
index 306279b7f9e7045197dd06134616add6d0e88609..12abe991583a872cb9375ec20482b3317c7fdf53 100644 (file)
@@ -115,7 +115,7 @@ static int mlx5_fpga_conn_post_recv(struct mlx5_fpga_conn *conn,
        ix = conn->qp.rq.pc & (conn->qp.rq.size - 1);
        data = mlx5_wq_cyc_get_wqe(&conn->qp.wq.rq, ix);
        data->byte_count = cpu_to_be32(buf->sg[0].size);
-       data->lkey = cpu_to_be32(conn->fdev->conn_res.mkey.key);
+       data->lkey = cpu_to_be32(conn->fdev->conn_res.mkey);
        data->addr = cpu_to_be64(buf->sg[0].dma_addr);
 
        conn->qp.rq.pc++;
@@ -155,7 +155,7 @@ static void mlx5_fpga_conn_post_send(struct mlx5_fpga_conn *conn,
                if (!buf->sg[sgi].data)
                        break;
                data->byte_count = cpu_to_be32(buf->sg[sgi].size);
-               data->lkey = cpu_to_be32(conn->fdev->conn_res.mkey.key);
+               data->lkey = cpu_to_be32(conn->fdev->conn_res.mkey);
                data->addr = cpu_to_be64(buf->sg[sgi].dma_addr);
                data++;
                size++;
@@ -221,7 +221,7 @@ static int mlx5_fpga_conn_post_recv_buf(struct mlx5_fpga_conn *conn)
 }
 
 static int mlx5_fpga_conn_create_mkey(struct mlx5_core_dev *mdev, u32 pdn,
-                                     struct mlx5_core_mkey *mkey)
+                                     u32 *mkey)
 {
        int inlen = MLX5_ST_SZ_BYTES(create_mkey_in);
        void *mkc;
@@ -978,7 +978,7 @@ int mlx5_fpga_conn_device_init(struct mlx5_fpga_device *fdev)
                mlx5_fpga_err(fdev, "create mkey failed, %d\n", err);
                goto err_dealloc_pd;
        }
-       mlx5_fpga_dbg(fdev, "Created mkey 0x%x\n", fdev->conn_res.mkey.key);
+       mlx5_fpga_dbg(fdev, "Created mkey 0x%x\n", fdev->conn_res.mkey);
 
        return 0;
 
@@ -994,7 +994,7 @@ out:
 
 void mlx5_fpga_conn_device_cleanup(struct mlx5_fpga_device *fdev)
 {
-       mlx5_core_destroy_mkey(fdev->mdev, &fdev->conn_res.mkey);
+       mlx5_core_destroy_mkey(fdev->mdev, fdev->conn_res.mkey);
        mlx5_core_dealloc_pd(fdev->mdev, fdev->conn_res.pdn);
        mlx5_put_uars_page(fdev->mdev, fdev->conn_res.uar);
        mlx5_nic_vport_disable_roce(fdev->mdev);