aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 11c7d6642014..114b802771ad 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -472,6 +472,7 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
472 472
473static void nes_retrans_expired(struct nes_cm_node *cm_node) 473static void nes_retrans_expired(struct nes_cm_node *cm_node)
474{ 474{
475 struct iw_cm_id *cm_id = cm_node->cm_id;
475 switch (cm_node->state) { 476 switch (cm_node->state) {
476 case NES_CM_STATE_SYN_RCVD: 477 case NES_CM_STATE_SYN_RCVD:
477 case NES_CM_STATE_CLOSING: 478 case NES_CM_STATE_CLOSING:
@@ -479,7 +480,9 @@ static void nes_retrans_expired(struct nes_cm_node *cm_node)
479 break; 480 break;
480 case NES_CM_STATE_LAST_ACK: 481 case NES_CM_STATE_LAST_ACK:
481 case NES_CM_STATE_FIN_WAIT1: 482 case NES_CM_STATE_FIN_WAIT1:
482 case NES_CM_STATE_MPAREJ_RCVD: 483 if (cm_node->cm_id)
484 cm_id->rem_ref(cm_id);
485 cm_node->state = NES_CM_STATE_CLOSED;
483 send_reset(cm_node, NULL); 486 send_reset(cm_node, NULL);
484 break; 487 break;
485 default: 488 default:
@@ -1406,6 +1409,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
1406 case NES_CM_STATE_CLOSED: 1409 case NES_CM_STATE_CLOSED:
1407 drop_packet(skb); 1410 drop_packet(skb);
1408 break; 1411 break;
1412 case NES_CM_STATE_FIN_WAIT1:
1409 case NES_CM_STATE_LAST_ACK: 1413 case NES_CM_STATE_LAST_ACK:
1410 cm_node->cm_id->rem_ref(cm_node->cm_id); 1414 cm_node->cm_id->rem_ref(cm_node->cm_id);
1411 case NES_CM_STATE_TIME_WAIT: 1415 case NES_CM_STATE_TIME_WAIT:
@@ -1413,8 +1417,6 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
1413 rem_ref_cm_node(cm_node->cm_core, cm_node); 1417 rem_ref_cm_node(cm_node->cm_core, cm_node);
1414 drop_packet(skb); 1418 drop_packet(skb);
1415 break; 1419 break;
1416 case NES_CM_STATE_FIN_WAIT1:
1417 nes_debug(NES_DBG_CM, "Bad state %s[%u]\n", __func__, __LINE__);
1418 default: 1420 default:
1419 drop_packet(skb); 1421 drop_packet(skb);
1420 break; 1422 break;