aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/infiniband/core/cma.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2015-12-18 10:59:45 +0200
committerDoug Ledford <dledford@redhat.com>2015-12-22 14:39:00 -0500
commit86bee4c9c126b4f73e3f152cd43c806cac9135ad (patch)
treec57b8c7a04f0a415549f5cd2d1c9195ae9a16e20 /drivers/infiniband/core/cma.c
parentIB/core: Save the device attributes on the device structure (diff)
downloadwireguard-linux-86bee4c9c126b4f73e3f152cd43c806cac9135ad.tar.xz
wireguard-linux-86bee4c9c126b4f73e3f152cd43c806cac9135ad.zip
IB/core: Avoid calling ib_query_device
Use the cached copy of the attributes present on the device, except for the case of a query originating from user-space, where we have to invoke the driver query_device entry, so they can fill in their udata. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/cma.c')
-rw-r--r--drivers/infiniband/core/cma.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d2d5d004f16d..f8dfc6335b66 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1894,7 +1894,6 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
struct rdma_id_private *listen_id, *conn_id;
struct rdma_cm_event event;
int ret;
- struct ib_device_attr attr;
struct sockaddr *laddr = (struct sockaddr *)&iw_event->local_addr;
struct sockaddr *raddr = (struct sockaddr *)&iw_event->remote_addr;
@@ -1936,13 +1935,6 @@ static int iw_conn_req_handler(struct iw_cm_id *cm_id,
memcpy(cma_src_addr(conn_id), laddr, rdma_addr_size(laddr));
memcpy(cma_dst_addr(conn_id), raddr, rdma_addr_size(raddr));
- ret = ib_query_device(conn_id->id.device, &attr);
- if (ret) {
- mutex_unlock(&conn_id->handler_mutex);
- rdma_destroy_id(new_cm_id);
- goto out;
- }
-
memset(&event, 0, sizeof event);
event.event = RDMA_CM_EVENT_CONNECT_REQUEST;
event.param.conn.private_data = iw_event->private_data;