aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-02-03 15:55:42 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2014-02-12 18:11:17 -0500
commit752d86805b18e58c56c6f3c7004c2dffd4430c17 (patch)
treedede6ee8a09fe85f89adc5d627b694c6616cbb5a /drivers/target/iscsi
parent6a16d7be932a9df1024836ccbb448de73afd3dd0 (diff)
iscsi-target: Fix SNACK Type 1 + BegRun=0 handling
This patch fixes Status SNACK handling of BegRun=0 to allow for all unacknowledged respones to be resent, instead of always assuming that BegRun would be an explicit value less than the current ExpStatSN. Reported-by: santosh kulkarni <santosh.kulkarni@calsoftinc.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index e048d6439f4a..cda4d80cfaef 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -507,7 +507,9 @@ int iscsit_handle_status_snack(
507 u32 last_statsn; 507 u32 last_statsn;
508 int found_cmd; 508 int found_cmd;
509 509
510 if (conn->exp_statsn > begrun) { 510 if (!begrun) {
511 begrun = conn->exp_statsn;
512 } else if (conn->exp_statsn > begrun) {
511 pr_err("Got Status SNACK Begrun: 0x%08x, RunLength:" 513 pr_err("Got Status SNACK Begrun: 0x%08x, RunLength:"
512 " 0x%08x but already got ExpStatSN: 0x%08x on CID:" 514 " 0x%08x but already got ExpStatSN: 0x%08x on CID:"
513 " %hu.\n", begrun, runlength, conn->exp_statsn, 515 " %hu.\n", begrun, runlength, conn->exp_statsn,