Skip to content
Commit 8764bd0f authored by Niklas Schnelle's avatar Niklas Schnelle Committed by Saeed Mahameed
Browse files

net/mlx5: Fix setting of irq->map.index for static IRQ case

When dynamic IRQ allocation is not supported all IRQs are allocated up
front in mlx5_irq_table_create() instead of dynamically as part of
mlx5_irq_alloc(). In the latter dynamic case irq->map.index is set
via the mapping returned by pci_msix_alloc_irq_at(). In the static case
and prior to commit 1da438c0

 ("net/mlx5: Fix indexing of mlx5_irq")
irq->map.index was set in mlx5_irq_alloc() twice once initially to 0 and
then to the requested index before storing in the xarray. After this
commit it is only set to 0 which breaks all other IRQ mappings.

Fix this by setting irq->map.index to the requested index together with
irq->map.virq and improve the related comment to make it clearer which
cases it deals with.

Cc: Chuck Lever III <chuck.lever@oracle.com>
Tested-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Reviewed-by: default avatarEli Cohen <elic@nvidia.com>
Fixes: 1da438c0

 ("net/mlx5: Fix indexing of mlx5_irq")
Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Tested-by: default avatarCédric Le Goater <clg@redhat.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 1c4c769c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment