public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/cxgb4: Unblock reads on comp_channel
@ 2011-10-13  8:21 Kumar Sanghvi
       [not found] ` <1318494090-9996-1-git-send-email-kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Kumar Sanghvi @ 2011-10-13  8:21 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: roland-BHEL68pLQRGGvPXPguhicg,
	swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	divy-ut6Up61K2wZBDgjK7y7TUQ, Kumar Sanghvi

At the time when peer closes connection, iw_cxgb4 will not
send a cq event if ibqp.uobject exists. In that case, its possible
for user application to get blocked in ibv_get_cq_event.

To resolve this, call the cq's comp_handler to unblock any read
from ibv_get_cq_event.

Signed-off-by: Kumar Sanghvi <kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/qp.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index ec3ce67..b59b56c 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -970,8 +970,12 @@ static void flush_qp(struct c4iw_qp *qhp)
 	if (qhp->ibqp.uobject) {
 		t4_set_wq_in_error(&qhp->wq);
 		t4_set_cq_in_error(&rchp->cq);
-		if (schp != rchp)
+		(*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
+		if (schp != rchp) {
 			t4_set_cq_in_error(&schp->cq);
+			(*schp->ibcq.comp_handler)(&schp->ibcq,
+					schp->ibcq.cq_context);
+		}
 		return;
 	}
 	__flush_qp(qhp, rchp, schp);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-21  7:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13  8:21 [PATCH] RDMA/cxgb4: Unblock reads on comp_channel Kumar Sanghvi
     [not found] ` <1318494090-9996-1-git-send-email-kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2011-10-13 15:54   ` Steve Wise
2011-10-13 16:01   ` Roland Dreier
     [not found]     ` <CAL1RGDU9Ka7-sGVnCnobgQjoh7p2bsXbSLp-Fnn6aA1Q9of36w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-13 16:12       ` Steve Wise
     [not found]         ` <4E970E02.2090207-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2011-10-14 20:22           ` Roland Dreier
2011-10-20  9:11           ` Parav.Pandit-iH1Dq9VlAzfQT0dZR+AlfA
     [not found]             ` <88B766C272F2C64B944B21AD078333151BEE2E947E-/SwythR3zqxVRK6PHKByhFaTQe2KTcn/@public.gmane.org>
2011-10-20 14:56               ` Steve Wise
2011-10-20 16:06               ` Roland Dreier
     [not found]                 ` <CAL1RGDXw9kkxAM8_pJ=jRhFTgRRt52QygDpQ+89RfEN=7QU=HQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-20 16:21                   ` Steve Wise
     [not found]                     ` <4EA04A95.9010908-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2011-10-20 17:25                       ` Parav.Pandit-iH1Dq9VlAzfQT0dZR+AlfA
     [not found]                         ` <88B766C272F2C64B944B21AD078333151BEE2E9521-/SwythR3zqxVRK6PHKByhFaTQe2KTcn/@public.gmane.org>
2011-10-20 17:30                           ` Steve Wise
     [not found]                             ` <4EA05AA0.4030201-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2011-10-21  7:32                               ` Kumar Sanghvi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox