Blob Blame Raw
From 5f28b8b73fbdb8c1e7fbe4a0e40dd2857b74b685 Mon Sep 17 00:00:00 2001
From: John Soni Jose <sony.john-n@emulex.com>
Date: Fri, 21 Mar 2014 11:51:09 +0530
Subject: [PATCH] be2iscsi: Fix MaxXmitDataLenght of the driver.

 Issue :
 During login negotiation if the MaxRecvDataSegmenLen given by the
 target is 0, then MRDSL default value of 8K should be considered.
 Some old targets close the CXN if the PDU received size is greater
 than the MaxRecvDataSegmentLen set during negotiation.

 Fix :
 When target is not sending MaxRecvDataSegmentLen in the negotiated
 params the value is 0. be2iscsi was setting max_xmit_dlength to 64k
 in this case. This fix sets the MaxRecvDataSegmentLen=8k if during
 negotiation the MaxRecvDataSegmentLen=0

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
---
 usr/be2iscsi.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/usr/be2iscsi.c b/usr/be2iscsi.c
index ce8b719..ba4c29f 100644
--- a/usr/be2iscsi.c
+++ b/usr/be2iscsi.c
@@ -33,10 +33,6 @@ void be2iscsi_create_conn(struct iscsi_conn *conn)
 	if (conn->max_xmit_dlength > 65536)
 		conn->max_xmit_dlength = 65536;
 
-	if (!conn_rec->iscsi.MaxXmitDataSegmentLength ||
-	    conn_rec->iscsi.MaxXmitDataSegmentLength > 65536)
-		conn_rec->iscsi.MaxXmitDataSegmentLength = 65536;
-
 	session->erl = 0;
 	session->initial_r2t_en = 1;
 }
-- 
1.9.3