|
@@ -420,6 +420,15 @@ static int mlx4_ib_query_port(struct ib_device *ibdev, u8 port,
|
|
|
return __mlx4_ib_query_port(ibdev, port, props, 0);
|
|
|
}
|
|
|
|
|
|
+static enum rdma_protocol_type
|
|
|
+mlx4_ib_query_protocol(struct ib_device *device, u8 port_num)
|
|
|
+{
|
|
|
+ struct mlx4_dev *dev = to_mdev(device)->dev;
|
|
|
+
|
|
|
+ return dev->caps.port_mask[port_num] == MLX4_PORT_TYPE_IB ?
|
|
|
+ RDMA_PROTOCOL_IB : RDMA_PROTOCOL_IBOE;
|
|
|
+}
|
|
|
+
|
|
|
int __mlx4_ib_query_gid(struct ib_device *ibdev, u8 port, int index,
|
|
|
union ib_gid *gid, int netw_view)
|
|
|
{
|
|
@@ -2201,6 +2210,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
|
|
|
|
|
|
ibdev->ib_dev.query_device = mlx4_ib_query_device;
|
|
|
ibdev->ib_dev.query_port = mlx4_ib_query_port;
|
|
|
+ ibdev->ib_dev.query_protocol = mlx4_ib_query_protocol;
|
|
|
ibdev->ib_dev.get_link_layer = mlx4_ib_port_link_layer;
|
|
|
ibdev->ib_dev.query_gid = mlx4_ib_query_gid;
|
|
|
ibdev->ib_dev.query_pkey = mlx4_ib_query_pkey;
|