aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2007-02-21 19:37:31 -0500
committerRoland Dreier <rolandd@cisco.com>2007-02-22 20:54:02 -0500
commit47645d8d25387c08bb3ccd84e1405c3776f21d24 (patch)
tree0d5267a1401c1d2ad80d48181f9c63b43ec84c3a /drivers/infiniband
parentaaf1aef55f50f53812871693692c7cbefcd57f39 (diff)
IB/core: Set hop limit in ib_init_ah_from_wc correctly
The hop_limit value in the ah_attr should be 0xFF, not the value read from the received GRH (which should be 0). See 13.5.4.4 in the 1.2 IB spec. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 8b5dd3649bbf..ccdf93d30b01 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -167,7 +167,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc,
167 ah_attr->grh.sgid_index = (u8) gid_index; 167 ah_attr->grh.sgid_index = (u8) gid_index;
168 flow_class = be32_to_cpu(grh->version_tclass_flow); 168 flow_class = be32_to_cpu(grh->version_tclass_flow);
169 ah_attr->grh.flow_label = flow_class & 0xFFFFF; 169 ah_attr->grh.flow_label = flow_class & 0xFFFFF;
170 ah_attr->grh.hop_limit = grh->hop_limit; 170 ah_attr->grh.hop_limit = 0xFF;
171 ah_attr->grh.traffic_class = (flow_class >> 20) & 0xFF; 171 ah_attr->grh.traffic_class = (flow_class >> 20) & 0xFF;
172 } 172 }
173 return 0; 173 return 0;