ib_srpt: Works again on mthca (not tested yet). A quote from the OFED 1.2.5

release notes (docs/mthca_release_notes.txt), section "3. Known Issues":

3. In mem-free devices, RC QPs can be created with a maximum of (max_sge - 3)
   entries only.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3627 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-06-25 19:32:32 +00:00
parent 5484d6dfc4
commit 85ac2c728b

View File

@@ -2008,8 +2008,8 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
qp_init->sq_sig_type = IB_SIGNAL_REQ_WR;
qp_init->qp_type = IB_QPT_RC;
qp_init->cap.max_send_wr = srpt_sq_size;
ch->max_sge = sdev->dev_attr.max_sge - 2;
BUG_ON(ch->max_sge <= 2);
ch->max_sge = sdev->dev_attr.max_sge - 3;
BUG_ON(ch->max_sge < 1);
qp_init->cap.max_send_sge = ch->max_sge;
ch->qp = ib_create_qp(sdev->pd, qp_init);