]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ehca: Correctly set GRH mask bit in ehca_modify_qp()
authorJoachim Fenkes <fenkes@de.ibm.com>
Wed, 9 May 2007 11:48:01 +0000 (13:48 +0200)
committerRoland Dreier <rolandd@cisco.com>
Mon, 14 May 2007 20:38:57 +0000 (13:38 -0700)
The driver needs to always supply the "GRH present" flag to the
hypervisor, whether it's true or false. Not supplying it (i.e. not
setting the corresponding mask bit) amounts to a "perhaps", which we
don't want.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_qp.c

index df0516f2437989c2cf4d5c6faea9095de26332bf..e21d79684057504fd7ef44dab6b0b4e5a0b340b9 100644 (file)
@@ -968,17 +968,21 @@ static int internal_modify_qp(struct ib_qp *ibqp,
                        ((ehca_mult - 1) / ah_mult) : 0;
                else
                        mqpcb->max_static_rate = 0;
-
                update_mask |= EHCA_BMASK_SET(MQPCB_MASK_MAX_STATIC_RATE, 1);
 
+               /*
+                * Always supply the GRH flag, even if it's zero, to give the
+                * hypervisor a clear "yes" or "no" instead of a "perhaps"
+                */
+               update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1);
+
                /*
                 * only if GRH is TRUE we might consider SOURCE_GID_IDX
                 * and DEST_GID otherwise phype will return H_ATTR_PARM!!!
                 */
                if (attr->ah_attr.ah_flags == IB_AH_GRH) {
-                       mqpcb->send_grh_flag = 1 << 31;
-                       update_mask |=
-                               EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1);
+                       mqpcb->send_grh_flag = 1;
+
                        mqpcb->source_gid_idx = attr->ah_attr.grh.sgid_index;
                        update_mask |=
                                EHCA_BMASK_SET(MQPCB_MASK_SOURCE_GID_IDX, 1);