diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2007-05-09 07:48:01 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-14 16:38:57 -0400 |
commit | 92761cdaf215599a1bd81d383facb32adabfa620 (patch) | |
tree | 40e14a4257b36ecca923572e3eeb9ba8c122c87d /drivers/infiniband | |
parent | 5d88278e3bdb6f2e4ed43306659e930ecd715f0c (diff) |
IB/ehca: Correctly set GRH mask bit in ehca_modify_qp()
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index df0516f24379..e21d79684057 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -968,17 +968,21 @@ static int internal_modify_qp(struct ib_qp *ibqp, | |||
968 | ((ehca_mult - 1) / ah_mult) : 0; | 968 | ((ehca_mult - 1) / ah_mult) : 0; |
969 | else | 969 | else |
970 | mqpcb->max_static_rate = 0; | 970 | mqpcb->max_static_rate = 0; |
971 | |||
972 | update_mask |= EHCA_BMASK_SET(MQPCB_MASK_MAX_STATIC_RATE, 1); | 971 | update_mask |= EHCA_BMASK_SET(MQPCB_MASK_MAX_STATIC_RATE, 1); |
973 | 972 | ||
974 | /* | 973 | /* |
974 | * Always supply the GRH flag, even if it's zero, to give the | ||
975 | * hypervisor a clear "yes" or "no" instead of a "perhaps" | ||
976 | */ | ||
977 | update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1); | ||
978 | |||
979 | /* | ||
975 | * only if GRH is TRUE we might consider SOURCE_GID_IDX | 980 | * only if GRH is TRUE we might consider SOURCE_GID_IDX |
976 | * and DEST_GID otherwise phype will return H_ATTR_PARM!!! | 981 | * and DEST_GID otherwise phype will return H_ATTR_PARM!!! |
977 | */ | 982 | */ |
978 | if (attr->ah_attr.ah_flags == IB_AH_GRH) { | 983 | if (attr->ah_attr.ah_flags == IB_AH_GRH) { |
979 | mqpcb->send_grh_flag = 1 << 31; | 984 | mqpcb->send_grh_flag = 1; |
980 | update_mask |= | 985 | |
981 | EHCA_BMASK_SET(MQPCB_MASK_SEND_GRH_FLAG, 1); | ||
982 | mqpcb->source_gid_idx = attr->ah_attr.grh.sgid_index; | 986 | mqpcb->source_gid_idx = attr->ah_attr.grh.sgid_index; |
983 | update_mask |= | 987 | update_mask |= |
984 | EHCA_BMASK_SET(MQPCB_MASK_SOURCE_GID_IDX, 1); | 988 | EHCA_BMASK_SET(MQPCB_MASK_SOURCE_GID_IDX, 1); |