[ewg] [PATCH] RDMA/code: Fix for problem with closing iWARP connection and DAPL

miroslaw.walukiewicz at intel.com miroslaw.walukiewicz at intel.com
Wed Feb 9 07:47:00 PST 2011


Now DAPL and nes driver can close connection correctly. 
Corrections in AEQE handling were made.

Signed-off-by: Mirek Walukiewicz <miroslaw.walukiewicz at intel.com>
Signed-off-by: Faisal Latif <faisal.latif at intel.com>
---

 kernel_patches/fixes/nes_0057_aeqe_fix.patch |   43 ++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 kernel_patches/fixes/nes_0057_aeqe_fix.patch


diff --git a/kernel_patches/fixes/nes_0057_aeqe_fix.patch b/kernel_patches/fixes/nes_0057_aeqe_fix.patch
new file mode 100644
index 0000000..ca2cedd
--- /dev/null
+++ b/kernel_patches/fixes/nes_0057_aeqe_fix.patch
@@ -0,0 +1,43 @@
+diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
+index 77fecbe..d6fe96a 100644
+--- a/drivers/infiniband/hw/nes/nes_hw.c
++++ b/drivers/infiniband/hw/nes/nes_hw.c
+@@ -3561,9 +3561,9 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
+ 
+ 	aeqe_cq_id = le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]);
+ 	if (aeq_info & NES_AEQE_QP) {
+-		if ((!nes_is_resource_allocated(nesadapter, nesadapter->allocated_qps,
+-				aeqe_cq_id)) ||
+-				(atomic_read(&nesqp->close_timer_started)))
++		if (!nes_is_resource_allocated(nesadapter,
++				nesadapter->allocated_qps,
++				aeqe_cq_id))
+ 			return;
+ 	}
+ 
+@@ -3573,8 +3573,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
+ 				return; /* Ignore it, wait for close complete */
+ 			if (atomic_inc_return(&nesqp->close_timer_started) == 1) {
+ 				if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) &&
+-					(nesqp->ibqp_state == IB_QPS_RTS) &&
+-					((nesadapter->eeprom_version >> 16) != NES_A0)) {
++					(nesqp->ibqp_state == IB_QPS_RTS)) {
+ 					spin_lock_irqsave(&nesqp->lock, flags);
+ 					nesqp->hw_iwarp_state = iwarp_state;
+ 					nesqp->hw_tcp_state = tcp_state;
+@@ -3601,9 +3600,13 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
+ 				return;
+ 			}
+ 			spin_lock_irqsave(&nesqp->lock, flags);
+-			nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_CLOSING;
++			nesqp->hw_iwarp_state = iwarp_state;
++			nesqp->hw_tcp_state = tcp_state;
++			nesqp->last_aeq = async_event_id;
+ 			spin_unlock_irqrestore(&nesqp->lock, flags);
+-			nes_hw_modify_qp(nesdev, nesqp, NES_CQP_QP_IWARP_STATE_CLOSING, 0, 0);
++			next_iwarp_state = NES_CQP_QP_IWARP_STATE_ERROR |
++							NES_CQP_QP_DEL_HTE;
++			nes_hw_modify_qp(nesdev, nesqp, next_iwarp_state, 0, 0);
+ 			nes_cm_disconn(nesqp);
+ 			break;
+ 





More information about the ewg mailing list