aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-05-02 19:46:47 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-05-10 10:13:21 -0500
commit8d2860b3c3e933304f49171770658c00ed26fd79 (patch)
tree979395449d53d41bd22732a4be1387f9af73a994 /drivers/scsi/iscsi_tcp.c
parentbe2df72e7ec5fa5e6e1ccccab6cef97ecbb9c191 (diff)
[SCSI] iscsi: increment expstatsn during login
debugged by Ming and Rohan: The problem Ming and Rohan debugged was that during a normal session login, open-iscsi is not incrementing the exp_statsn counter. It was stuck at zero. From the RFC, it looks like if the login response PDU has a successful status then we should be incrementing that value. Also from the RFC, it looks like if when we drop a connection then reconnect, we should be using the exp_statsn from the old connection in the next relogin attempt. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r--drivers/scsi/iscsi_tcp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 41f4bb557ea..c0ce6ab81a9 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -2298,6 +2298,9 @@ iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param,
BUG_ON(value);
session->ofmarker_en = value;
break;
+ case ISCSI_PARAM_EXP_STATSN:
+ conn->exp_statsn = value;
+ break;
default:
break;
}
@@ -2381,6 +2384,9 @@ iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
inet = inet_sk(tcp_conn->sock->sk);
*value = be16_to_cpu(inet->dport);
mutex_unlock(&conn->xmitmutex);
+ case ISCSI_PARAM_EXP_STATSN:
+ *value = conn->exp_statsn;
+ break;
default:
return -EINVAL;
}
@@ -2548,7 +2554,8 @@ static struct iscsi_transport iscsi_tcp_transport = {
ISCSI_DATASEQ_INORDER_EN |
ISCSI_ERL |
ISCSI_CONN_PORT |
- ISCSI_CONN_ADDRESS,
+ ISCSI_CONN_ADDRESS |
+ ISCSI_EXP_STATSN,
.host_template = &iscsi_sht,
.conndata_size = sizeof(struct iscsi_conn),
.max_conn = 1,