]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB: Set GIDs correctly in ib_create_ah_from_wc()
authorRalph Campbell <ralphc@pathscale.com>
Sat, 7 Jan 2006 00:43:47 +0000 (16:43 -0800)
committerRoland Dreier <rolandd@cisco.com>
Sat, 7 Jan 2006 00:43:47 +0000 (16:43 -0800)
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>
drivers/infiniband/core/verbs.c

index 4c15e112736ca13408bfc1c7472258c1bb955ca6..c857361be4490d805a811f81bf95b3a21052148a 100644 (file)
@@ -107,9 +107,9 @@ struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc,
 
        if (wc->wc_flags & IB_WC_GRH) {
                ah_attr.ah_flags = IB_AH_GRH;
-               ah_attr.grh.dgid = grh->dgid;
+               ah_attr.grh.dgid = grh->sgid;
 
-               ret = ib_find_cached_gid(pd->device, &grh->sgid, &port_num,
+               ret = ib_find_cached_gid(pd->device, &grh->dgid, &port_num,
                                         &gid_index);
                if (ret)
                        return ERR_PTR(ret);