net/mlx5: Fix driver load with single msix vector
authorEli Cohen <elic@nvidia.com>
Wed, 3 May 2023 12:10:05 +0000 (15:10 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 16 Jun 2023 19:59:19 +0000 (12:59 -0700)
commit0ab999d4a1bfe8251538be1e7e495c50433475a8
tree05f52d5ea86fe38413014ff4a7bbf2526b7a1068
parent62a522d3354d81a86dd56feeb40e5ced36d72737
net/mlx5: Fix driver load with single msix vector

When a PCI device has just one msix vector available, we want to share
this vector between async and completion events. Current code fails to
do that assuming it will always have at least one dedicated vector for
completion events. Fix this by detecting when the pool contains just a
single vector.

Fixes: 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c