Skip to content

Commit

Permalink
RDMA/cma: Reenable device removal on passive side
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Sokolovsky authored and Roland Dreier committed Jan 25, 2008
1 parent b61d92d commit 45d9478
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45d9478

Please sign in to comment.