aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorFaisal Latif <faisal.latif@intel.com>2010-08-14 17:05:04 -0400
committerRoland Dreier <rolandd@cisco.com>2010-09-08 17:38:04 -0400
commit67d70721151726286763209ecadc3fce86abfdce (patch)
treef0975af0127100aeb17287cc6709909fd3ad8862 /drivers/infiniband
parentdae58728dc64e9ad71c40ac90b463bff6ecce271 (diff)
RDMA/nes: Change state to closing after FIN
When the driver receives an AE for FIN received, it closes the connection without changing the state of the connection in the hardware to closing. By changing the state to closing, hardware will do a normal close sequence. Signed-off-by: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index f8233c851c69..ba93a8be6bf6 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -3468,6 +3468,18 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
3468 return; /* Ignore it, wait for close complete */ 3468 return; /* Ignore it, wait for close complete */
3469 3469
3470 if (atomic_inc_return(&nesqp->close_timer_started) == 1) { 3470 if (atomic_inc_return(&nesqp->close_timer_started) == 1) {
3471 if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) &&
3472 (nesqp->ibqp_state == IB_QPS_RTS)) {
3473 spin_lock_irqsave(&nesqp->lock, flags);
3474 nesqp->hw_iwarp_state = iwarp_state;
3475 nesqp->hw_tcp_state = tcp_state;
3476 nesqp->last_aeq = async_event_id;
3477 next_iwarp_state = NES_CQP_QP_IWARP_STATE_CLOSING;
3478 nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_CLOSING;
3479 spin_unlock_irqrestore(&nesqp->lock, flags);
3480 nes_hw_modify_qp(nesdev, nesqp, next_iwarp_state, 0, 0);
3481 nes_cm_disconn(nesqp);
3482 }
3471 nesqp->cm_id->add_ref(nesqp->cm_id); 3483 nesqp->cm_id->add_ref(nesqp->cm_id);
3472 schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp, 3484 schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp,
3473 NES_TIMER_TYPE_CLOSE, 1, 0); 3485 NES_TIMER_TYPE_CLOSE, 1, 0);
@@ -3477,7 +3489,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
3477 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), 3489 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
3478 async_event_id, nesqp->last_aeq, tcp_state); 3490 async_event_id, nesqp->last_aeq, tcp_state);
3479 } 3491 }
3480
3481 break; 3492 break;
3482 case NES_AEQE_AEID_LLP_CLOSE_COMPLETE: 3493 case NES_AEQE_AEID_LLP_CLOSE_COMPLETE:
3483 if (nesqp->term_flags) { 3494 if (nesqp->term_flags) {