[ofa-general] [TEST] test code to make msi-x fail

Michael S. Tsirkin mst at dev.mellanox.co.il
Sun Jul 22 02:15:44 PDT 2007


Here's a patch I used to test MSI-X failure recovery code
in mlx4 and mthca. Posted in case it's useful to someone.

Signed-off-by: Michael S. Tsirkin <mst at dev.mellanox.co.il>

---

Index: linux-2.6/drivers/infiniband/hw/mthca/mthca_eq.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/hw/mthca/mthca_eq.c	2007-07-19 09:36:11.000000000 +0300
+++ linux-2.6/drivers/infiniband/hw/mthca/mthca_eq.c	2007-07-22 12:02:17.000000000 +0300
@@ -436,7 +436,8 @@ static irqreturn_t mthca_tavor_msi_x_int
 	struct mthca_eq  *eq  = eq_ptr;
 	struct mthca_dev *dev = eq->dev;
 
-	mthca_eq_int(dev, eq);
+	if (0)
+		mthca_eq_int(dev, eq);
 	tavor_set_eq_ci(dev, eq, eq->cons_index);
 	tavor_eq_req_not(dev, eq->eqn);
 
Index: linux-2.6/drivers/net/mlx4/eq.c
===================================================================
--- linux-2.6.orig/drivers/net/mlx4/eq.c	2007-07-19 09:30:35.000000000 +0300
+++ linux-2.6/drivers/net/mlx4/eq.c	2007-07-22 12:01:35.000000000 +0300
@@ -273,7 +273,8 @@ static irqreturn_t mlx4_msi_x_interrupt(
 	struct mlx4_eq  *eq  = eq_ptr;
 	struct mlx4_dev *dev = eq->dev;
 
-	mlx4_eq_int(dev, eq);
+	if (0)
+		mlx4_eq_int(dev, eq);
 
 	/* MSI-X vectors always belong to us */
 	return IRQ_HANDLED;

-- 
MST



More information about the general mailing list