summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarol L Soto <clsoto@linux.vnet.ibm.com>2015-10-08 14:26:15 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-09 16:43:38 +0200
commit820d39f3c497df6c8e040b8dcc7c19eeaa312701 (patch)
treede2d3fa7d7712972316c4d0a55ffe98345233c41
parentnet/mlx4: Remove shared_ports variable at mlx4_enable_msi_x (diff)
downloadlinux-820d39f3c497df6c8e040b8dcc7c19eeaa312701.tar.xz
linux-820d39f3c497df6c8e040b8dcc7c19eeaa312701.zip
net/mlx4_core: Avoid failing the interrupts test
Test interrupts fails if not all completion vectors called request_irq. This case happens if only mlx4_en is loaded and we have more completion vectors than rx rings. Fixes: c66fa19c405a ('net/mlx4: Add EQ pool') Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com> Acked-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/eq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 8e81e53c370e..c34488479365 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev)
* and performing a NOP command
*/
for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) {
+ /* Make sure request_irq was called */
+ if (!priv->eq_table.eq[i].have_irq)
+ continue;
+
/* Temporary use polling for command completions */
mlx4_cmd_use_polling(dev);