diff options
author | Petr Pavlu <petr.pavlu@suse.com> | 2023-08-21 15:12:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-23 09:25:28 +0200 |
commit | 7d22b1cb9d84d209bdd6f43ef683d7322682d6b4 (patch) | |
tree | 1aace2277a1192e917213cc035acd2f6f1209df5 /drivers/net/ethernet/mellanox/mlx4/intf.c | |
parent | mlx4: Connect the ethernet part to the auxiliary bus (diff) | |
download | linux-7d22b1cb9d84d209bdd6f43ef683d7322682d6b4.tar.xz linux-7d22b1cb9d84d209bdd6f43ef683d7322682d6b4.zip |
mlx4: Connect the infiniband part to the auxiliary bus
Use the auxiliary bus to perform device management of the infiniband
part of the mlx4 driver.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Tested-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/intf.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/intf.c b/drivers/net/ethernet/mellanox/mlx4/intf.c index 95ff0ea435e2..7579031786ac 100644 --- a/drivers/net/ethernet/mellanox/mlx4/intf.c +++ b/drivers/net/ethernet/mellanox/mlx4/intf.c @@ -59,11 +59,24 @@ static bool is_eth_supported(struct mlx4_dev *dev) return false; } +static bool is_ib_supported(struct mlx4_dev *dev) +{ + for (int port = 1; port <= dev->caps.num_ports; port++) + if (dev->caps.port_type[port] == MLX4_PORT_TYPE_IB) + return true; + + if (dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE) + return true; + + return false; +} + static const struct mlx4_adev_device { const char *suffix; bool (*is_supported)(struct mlx4_dev *dev); } mlx4_adev_devices[] = { { "eth", is_eth_supported }, + { "ib", is_ib_supported }, }; int mlx4_adev_init(struct mlx4_dev *dev) |