[openib-general] Re: does the mthca driver support RTS->SQD event request?

Roland Dreier rdreier at cisco.com
Thu Feb 2 20:31:59 PST 2006


Here's a patch to mthca that adds handling for the en_sqd_async_notify
flag in modify QP.  I haven't tested it yet.  Can you review it and
run your test, and let me know how it works?  If it looks good to you
then I will commit it and queue it for 2.6.17.

 - R.

--- infiniband/hw/mthca/mthca_cmd.c	(revision 5287)
+++ infiniband/hw/mthca/mthca_cmd.c	(working copy)
@@ -1638,7 +1638,8 @@ int mthca_MODIFY_QP(struct mthca_dev *de
 		}
 
 	} else
-		err = mthca_cmd(dev, mailbox->dma, (!!is_ee << 24) | num,
+		err = mthca_cmd(dev, mailbox->dma,
+				optmask | (!!is_ee << 24) | num,
 				op_mod, op[trans], CMD_TIME_CLASS_C, status);
 
 	if (my_mailbox)
--- infiniband/hw/mthca/mthca_qp.c	(revision 5287)
+++ infiniband/hw/mthca/mthca_qp.c	(working copy)
@@ -575,6 +575,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, 
 	struct mthca_qp_param *qp_param;
 	struct mthca_qp_context *qp_context;
 	u32 req_param, opt_param;
+	u32 sqd_event = 0;
 	u8 status;
 	int err;
 
@@ -839,8 +840,13 @@ int mthca_modify_qp(struct ib_qp *ibqp, 
 		qp_context->srqn = cpu_to_be32(1 << 24 |
 					       to_msrq(ibqp->srq)->srqn);
 
+	if (cur_state == IB_QPS_RTS && new_state == IB_QPS_SQD	&&
+	    attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY		&&
+	    attr->en_sqd_async_notify)
+		sqd_event = 1 << 31;
+
 	err = mthca_MODIFY_QP(dev, state_table[cur_state][new_state].trans,
-			      qp->qpn, 0, mailbox, 0, &status);
+			      qp->qpn, 0, mailbox, sqd_event, &status);
 	if (status) {
 		mthca_warn(dev, "modify QP %d returned status %02x.\n",
 			   state_table[cur_state][new_state].trans, status);



More information about the general mailing list