summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorVladimir Sokolovsky <vlad@mellanox.co.il>2007-12-08 05:32:03 +0100
committerRoland Dreier <rolandd@cisco.com>2008-01-25 23:15:31 +0100
commit45d9478da106c749203056f56e94d0e370dfac87 (patch)
tree72cb4a06f5c5db9a74de080cf9bd688a36f3848b /drivers/infiniband/core
parentIB/mad: Fix incorrect access to items on local_list (diff)
downloadlinux-45d9478da106c749203056f56e94d0e370dfac87.tar.xz
linux-45d9478da106c749203056f56e94d0e370dfac87.zip
RDMA/cma: Reenable device removal on passive side
Enable conn_id remove on the passive side after connection establishment. This corrects an issue where the IB driver can't be unloaded after running applications over RDS. The 'dev_remove' counter does not reach 0 for established connections on the passive side. This problem is limited to device removal, and only occurs on the passive side if there are established connections. Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/cma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 5a80e74731c8..312ec74f3d18 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1122,8 +1122,10 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
cm_id->cm_handler = cma_ib_handler;
ret = conn_id->id.event_handler(&conn_id->id, &event);
- if (!ret)
+ if (!ret) {
+ cma_enable_remove(conn_id);
goto out;
+ }
/* Destroy the CM ID by returning a non-zero value. */
conn_id->cm_id.ib = NULL;