summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/verbs.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-07-20 09:46:42 +0200
committerIngo Molnar <mingo@kernel.org>2016-07-20 09:46:42 +0200
commit4fffe71dd913cca5532da594e2f48a0db6b494dc (patch)
tree6e0dc83582382506e8b70760d8b59a50d93bfa5a /drivers/infiniband/core/verbs.c
parent4b3b234f434d440fcd749b9636131b76e2ce561e (diff)
parent47ef4ad2684d380dd6d596140fb79395115c3950 (diff)
downloadlinux-4fffe71dd913cca5532da594e2f48a0db6b494dc.tar.gz
linux-4fffe71dd913cca5532da594e2f48a0db6b494dc.tar.xz
Merge branch 'linus' into x86/cpu, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
-rw-r--r--drivers/infiniband/core/verbs.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 1d7d4cf442e3..6298f54b4137 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -511,12 +511,16 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
ah_attr->grh.dgid = sgid;
if (!rdma_cap_eth_ah(device, port_num)) {
- ret = ib_find_cached_gid_by_port(device, &dgid,
- IB_GID_TYPE_IB,
- port_num, NULL,
- &gid_index);
- if (ret)
- return ret;
+ if (dgid.global.interface_id != cpu_to_be64(IB_SA_WELL_KNOWN_GUID)) {
+ ret = ib_find_cached_gid_by_port(device, &dgid,
+ IB_GID_TYPE_IB,
+ port_num, NULL,
+ &gid_index);
+ if (ret)
+ return ret;
+ } else {
+ gid_index = 0;
+ }
}
ah_attr->grh.sgid_index = (u8) gid_index;