aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 9f0b964b2c99..499d3cf83e1f 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1956,13 +1956,6 @@ static int mini_cm_reject(struct nes_cm_core *cm_core,
1956 return ret; 1956 return ret;
1957 cleanup_retrans_entry(cm_node); 1957 cleanup_retrans_entry(cm_node);
1958 cm_node->state = NES_CM_STATE_CLOSED; 1958 cm_node->state = NES_CM_STATE_CLOSED;
1959 ret = send_fin(cm_node, NULL);
1960
1961 if (cm_node->accept_pend) {
1962 BUG_ON(!cm_node->listener);
1963 atomic_dec(&cm_node->listener->pend_accepts_cnt);
1964 BUG_ON(atomic_read(&cm_node->listener->pend_accepts_cnt) < 0);
1965 }
1966 1959
1967 ret = send_reset(cm_node, NULL); 1960 ret = send_reset(cm_node, NULL);
1968 return ret; 1961 return ret;
@@ -2383,6 +2376,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
2383 atomic_inc(&cm_disconnects); 2376 atomic_inc(&cm_disconnects);
2384 cm_event.event = IW_CM_EVENT_DISCONNECT; 2377 cm_event.event = IW_CM_EVENT_DISCONNECT;
2385 if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) { 2378 if (last_ae == NES_AEQE_AEID_LLP_CONNECTION_RESET) {
2379 issued_disconnect_reset = 1;
2386 cm_event.status = IW_CM_EVENT_STATUS_RESET; 2380 cm_event.status = IW_CM_EVENT_STATUS_RESET;
2387 nes_debug(NES_DBG_CM, "Generating a CM " 2381 nes_debug(NES_DBG_CM, "Generating a CM "
2388 "Disconnect Event (status reset) for " 2382 "Disconnect Event (status reset) for "
@@ -2508,7 +2502,6 @@ static int nes_disconnect(struct nes_qp *nesqp, int abrupt)
2508 nes_debug(NES_DBG_CM, "Call close API\n"); 2502 nes_debug(NES_DBG_CM, "Call close API\n");
2509 2503
2510 g_cm_core->api->close(g_cm_core, nesqp->cm_node); 2504 g_cm_core->api->close(g_cm_core, nesqp->cm_node);
2511 nesqp->cm_node = NULL;
2512 } 2505 }
2513 2506
2514 return ret; 2507 return ret;
@@ -2837,6 +2830,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
2837 cm_node->apbvt_set = 1; 2830 cm_node->apbvt_set = 1;
2838 nesqp->cm_node = cm_node; 2831 nesqp->cm_node = cm_node;
2839 cm_node->nesqp = nesqp; 2832 cm_node->nesqp = nesqp;
2833 nes_add_ref(&nesqp->ibqp);
2840 2834
2841 return 0; 2835 return 0;
2842} 2836}
@@ -3167,7 +3161,6 @@ static void cm_event_connect_error(struct nes_cm_event *event)
3167 if (ret) 3161 if (ret)
3168 printk(KERN_ERR "%s[%u] OFA CM event_handler returned, " 3162 printk(KERN_ERR "%s[%u] OFA CM event_handler returned, "
3169 "ret=%d\n", __func__, __LINE__, ret); 3163 "ret=%d\n", __func__, __LINE__, ret);
3170 nes_rem_ref(&nesqp->ibqp);
3171 cm_id->rem_ref(cm_id); 3164 cm_id->rem_ref(cm_id);
3172 3165
3173 rem_ref_cm_node(event->cm_node->cm_core, event->cm_node); 3166 rem_ref_cm_node(event->cm_node->cm_core, event->cm_node);