diff options
-rw-r--r-- | drivers/infiniband/core/cma.c | 7 | ||||
-rw-r--r-- | include/rdma/rdma_cm.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 79792c92e6fb..e980ff3335db 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -920,7 +920,10 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) | |||
920 | struct rdma_cm_event event; | 920 | struct rdma_cm_event event; |
921 | int ret = 0; | 921 | int ret = 0; |
922 | 922 | ||
923 | if (cma_disable_callback(id_priv, CMA_CONNECT)) | 923 | if ((ib_event->event != IB_CM_TIMEWAIT_EXIT && |
924 | cma_disable_callback(id_priv, CMA_CONNECT)) || | ||
925 | (ib_event->event == IB_CM_TIMEWAIT_EXIT && | ||
926 | cma_disable_callback(id_priv, CMA_DISCONNECT))) | ||
924 | return 0; | 927 | return 0; |
925 | 928 | ||
926 | memset(&event, 0, sizeof event); | 929 | memset(&event, 0, sizeof event); |
@@ -956,6 +959,8 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) | |||
956 | event.event = RDMA_CM_EVENT_DISCONNECTED; | 959 | event.event = RDMA_CM_EVENT_DISCONNECTED; |
957 | break; | 960 | break; |
958 | case IB_CM_TIMEWAIT_EXIT: | 961 | case IB_CM_TIMEWAIT_EXIT: |
962 | event.event = RDMA_CM_EVENT_TIMEWAIT_EXIT; | ||
963 | break; | ||
959 | case IB_CM_MRA_RECEIVED: | 964 | case IB_CM_MRA_RECEIVED: |
960 | /* ignore event */ | 965 | /* ignore event */ |
961 | goto out; | 966 | goto out; |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 001d606517ff..df7faf09d66f 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -58,7 +58,8 @@ enum rdma_cm_event_type { | |||
58 | RDMA_CM_EVENT_DEVICE_REMOVAL, | 58 | RDMA_CM_EVENT_DEVICE_REMOVAL, |
59 | RDMA_CM_EVENT_MULTICAST_JOIN, | 59 | RDMA_CM_EVENT_MULTICAST_JOIN, |
60 | RDMA_CM_EVENT_MULTICAST_ERROR, | 60 | RDMA_CM_EVENT_MULTICAST_ERROR, |
61 | RDMA_CM_EVENT_ADDR_CHANGE | 61 | RDMA_CM_EVENT_ADDR_CHANGE, |
62 | RDMA_CM_EVENT_TIMEWAIT_EXIT | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | enum rdma_port_space { | 65 | enum rdma_port_space { |