From: Stefan Roscher Date: Mon, 9 Jul 2007 13:27:13 +0000 (+0200) Subject: IB/ehca: Set SEND_GRH flag for all non-LL UD QPs on eHCA2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85f003172fc130626261730141ed021258e81f85;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git IB/ehca: Set SEND_GRH flag for all non-LL UD QPs on eHCA2 Signed-off-by: Joachim Fenkes Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index fa3e03050347..3a4b2bfdb06b 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c @@ -1054,6 +1054,17 @@ static int internal_modify_qp(struct ib_qp *ibqp, "ehca_qp=%p qp_num=%x qp_state_xsit=%x", my_qp, ibqp->qp_num, statetrans); + /* eHCA2 rev2 and higher require the SEND_GRH_FLAG to be set + * in non-LL UD QPs. + */ + if ((my_qp->qp_type == IB_QPT_UD) && + (my_qp->ext_type != EQPT_LLQP) && + (statetrans == IB_QPST_INIT2RTR) && + (shca->hw_level >= 0x22)) { + update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1); + mqpcb->send_grh_flag = 1; + } + /* sqe -> rts: set purge bit of bad wqe before actual trans */ if ((my_qp->qp_type == IB_QPT_UD || my_qp->qp_type == IB_QPT_GSI ||