aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/fw.c
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2019-06-30 19:23:23 +0300
committerLeon Romanovsky <leonro@mellanox.com>2019-07-03 20:55:45 +0300
commitb9a7ba5562074855e8a3f92ea7e1174b61a3e87d (patch)
tree3d2f3e4af99d2d31565ead07481717908a22fcd2 /drivers/net/ethernet/mellanox/mlx5/core/fw.c
parentnet/mlx5: Fix mlx5_core_destroy_cq() error flow (diff)
downloadlinux-dev-b9a7ba5562074855e8a3f92ea7e1174b61a3e87d.tar.xz
linux-dev-b9a7ba5562074855e8a3f92ea7e1174b61a3e87d.zip
net/mlx5: Use event mask based on device capabilities
Use the reported device capabilities for the supported user events (i.e. affiliated and un-affiliated) to set the EQ mask. As the event mask can be up to 256 defined by 4 entries of u64 change the applicable code to work accordingly. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
index 1ab6f7e3bec6..05367f15c3a7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
@@ -202,6 +202,12 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
return err;
}
+ if (MLX5_CAP_GEN(dev, event_cap)) {
+ err = mlx5_core_get_caps(dev, MLX5_CAP_DEV_EVENT);
+ if (err)
+ return err;
+ }
+
return 0;
}