diff options
author | Ralph Campbell <ralphc@pathscale.com> | 2006-01-06 19:43:47 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-06 19:43:47 -0500 |
commit | 4f8448dfe8d3804fadad90c9b77494238b4a4eae (patch) | |
tree | 0d057d70db0dd4c2dda85a3d932af70bd7025686 /drivers/infiniband | |
parent | ac4e7b35579de55db50d602a472858867808a9c3 (diff) |
IB: Set GIDs correctly in ib_create_ah_from_wc()
ib_create_ah_from_wc() doesn't create the correct return address (AH)
when there is a GRH present (source & dest GIDs need to be swapped).
Signed-off-by: Ralph Campbell <ralphc@pathscale.com>
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 4c15e112736c..c857361be449 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c | |||
@@ -107,9 +107,9 @@ struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc, | |||
107 | 107 | ||
108 | if (wc->wc_flags & IB_WC_GRH) { | 108 | if (wc->wc_flags & IB_WC_GRH) { |
109 | ah_attr.ah_flags = IB_AH_GRH; | 109 | ah_attr.ah_flags = IB_AH_GRH; |
110 | ah_attr.grh.dgid = grh->dgid; | 110 | ah_attr.grh.dgid = grh->sgid; |
111 | 111 | ||
112 | ret = ib_find_cached_gid(pd->device, &grh->sgid, &port_num, | 112 | ret = ib_find_cached_gid(pd->device, &grh->dgid, &port_num, |
113 | &gid_index); | 113 | &gid_index); |
114 | if (ret) | 114 | if (ret) |
115 | return ERR_PTR(ret); | 115 | return ERR_PTR(ret); |