aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2008-07-22 17:18:07 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-22 17:18:07 -0400
commit5b673b71c8ca0fbdb99dc1b1434cfb554212d6ff (patch)
tree6ef6d830a63e9fe417f6f05e819e5af56979d422 /drivers/infiniband
parentd35cb360c29956510b2fe1a953bd4968536f7216 (diff)
IB/ehca: Filter PATH_MIG events if QP was never armed
Certain firmware versions sometimes cause spurious PATH_MIG events to occur during QP creation. Filter these events by making sure PATH_MIG events are only handed down when they actually make sense (i.e. when the QP has been armed at least once). Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_classes.h1
-rw-r--r--drivers/infiniband/hw/ehca/ehca_irq.c4
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
index 1e9e99a13933..0b0618edd645 100644
--- a/drivers/infiniband/hw/ehca/ehca_classes.h
+++ b/drivers/infiniband/hw/ehca/ehca_classes.h
@@ -194,6 +194,7 @@ struct ehca_qp {
194 u32 packet_count; 194 u32 packet_count;
195 atomic_t nr_events; /* events seen */ 195 atomic_t nr_events; /* events seen */
196 wait_queue_head_t wait_completion; 196 wait_queue_head_t wait_completion;
197 int mig_armed;
197}; 198};
198 199
199#define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ) 200#define IS_SRQ(qp) (qp->ext_type == EQPT_SRQ)
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c
index 0792d930c481..99642a6e17c4 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -178,6 +178,10 @@ static void dispatch_qp_event(struct ehca_shca *shca, struct ehca_qp *qp,
178{ 178{
179 struct ib_event event; 179 struct ib_event event;
180 180
181 /* PATH_MIG without the QP ever having been armed is false alarm */
182 if (event_type == IB_EVENT_PATH_MIG && !qp->mig_armed)
183 return;
184
181 event.device = &shca->ib_device; 185 event.device = &shca->ib_device;
182 event.event = event_type; 186 event.event = event_type;
183 187
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index 3f59587338ea..ea13efddf175 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -1460,6 +1460,8 @@ static int internal_modify_qp(struct ib_qp *ibqp,
1460 goto modify_qp_exit2; 1460 goto modify_qp_exit2;
1461 } 1461 }
1462 mqpcb->path_migration_state = attr->path_mig_state + 1; 1462 mqpcb->path_migration_state = attr->path_mig_state + 1;
1463 if (attr->path_mig_state == IB_MIG_REARM)
1464 my_qp->mig_armed = 1;
1463 update_mask |= 1465 update_mask |=
1464 EHCA_BMASK_SET(MQPCB_MASK_PATH_MIGRATION_STATE, 1); 1466 EHCA_BMASK_SET(MQPCB_MASK_PATH_MIGRATION_STATE, 1);
1465 } 1467 }