aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/cma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index b60ce2226965..ca4c5dcd7133 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -359,6 +359,10 @@ static int cma_acquire_dev(struct rdma_id_private *id_priv)
359 enum rdma_link_layer dev_ll = dev_addr->dev_type == ARPHRD_INFINIBAND ? 359 enum rdma_link_layer dev_ll = dev_addr->dev_type == ARPHRD_INFINIBAND ?
360 IB_LINK_LAYER_INFINIBAND : IB_LINK_LAYER_ETHERNET; 360 IB_LINK_LAYER_INFINIBAND : IB_LINK_LAYER_ETHERNET;
361 361
362 if (dev_ll != IB_LINK_LAYER_INFINIBAND &&
363 id_priv->id.ps == RDMA_PS_IPOIB)
364 return -EINVAL;
365
362 mutex_lock(&lock); 366 mutex_lock(&lock);
363 iboe_addr_get_sgid(dev_addr, &iboe_gid); 367 iboe_addr_get_sgid(dev_addr, &iboe_gid);
364 memcpy(&gid, dev_addr->src_dev_addr + 368 memcpy(&gid, dev_addr->src_dev_addr +