if (attr_mask & IB_QP_AV) {
qp_context->pri_path.g_mylmc = attr->ah_attr.src_path_bits & 0x7f;
qp_context->pri_path.rlid = cl_hton16(attr->ah_attr.dlid);
- qp_context->pri_path.static_rate = (u8)!!attr->ah_attr.static_rate;
+ //TODO: work around: set always full speed - really, it's much more complicate
+ qp_context->pri_path.static_rate = 0;
if (attr->ah_attr.ah_flags & IB_AH_GRH) {
qp_context->pri_path.g_mylmc |= 1 << 7;
qp_context->pri_path.mgid_index = attr->ah_attr.grh.sgid_index;
qp->sq.head, qp->sq.tail,
qp->sq.max, nreq));
err = -ENOMEM;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
(void*)(wqe - sizeof (struct mthca_next_seg)),
(void*)wqe);
if (err) {
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
wqe += sizeof (struct mthca_data_seg);
if ((int)(int)wr->num_ds > qp->sq.max_gs) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("SQ %06x too many gathers\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
if (opcode == MTHCA_OPCODE_INVALID) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("SQ %06x opcode invalid\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
qp->rq.head, qp->rq.tail,
qp->rq.max, nreq));
err = -ENOMEM;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
if (unlikely((int)wr->num_ds > qp->rq.max_gs)) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("RQ %06x too many gathers\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
qp->sq.head, qp->sq.tail,
qp->sq.max, nreq));
err = -ENOMEM;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
(void*)(wqe - sizeof (struct mthca_next_seg)),
(void*)wqe);
if (err) {
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
wqe += sizeof (struct mthca_data_seg);
if ((int)wr->num_ds > qp->sq.max_gs) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("SQ %06x full too many gathers\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
if (opcode == MTHCA_OPCODE_INVALID) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("SQ %06x opcode invalid\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
qp->rq.head, qp->rq.tail,
qp->rq.max, nreq));
err = -ENOMEM;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}
if (unlikely((int)wr->num_ds > qp->rq.max_gs)) {
HCA_PRINT(TRACE_LEVEL_ERROR ,HCA_DBG_QP ,("RQ %06x full too many scatter\n",qp->qpn));
err = -EINVAL;
- *bad_wr = wr;
+ if (bad_wr)
+ *bad_wr = wr;
goto out;
}