diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-05-02 20:46:47 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-10 11:13:21 -0400 |
commit | 8d2860b3c3e933304f49171770658c00ed26fd79 (patch) | |
tree | 979395449d53d41bd22732a4be1387f9af73a994 /drivers/scsi/iscsi_tcp.c | |
parent | be2df72e7ec5fa5e6e1ccccab6cef97ecbb9c191 (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.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 41f4bb557ea6..c0ce6ab81a9d 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, | |||
2298 | BUG_ON(value); | 2298 | BUG_ON(value); |
2299 | session->ofmarker_en = value; | 2299 | session->ofmarker_en = value; |
2300 | break; | 2300 | break; |
2301 | case ISCSI_PARAM_EXP_STATSN: | ||
2302 | conn->exp_statsn = value; | ||
2303 | break; | ||
2301 | default: | 2304 | default: |
2302 | break; | 2305 | break; |
2303 | } | 2306 | } |
@@ -2381,6 +2384,9 @@ iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
2381 | inet = inet_sk(tcp_conn->sock->sk); | 2384 | inet = inet_sk(tcp_conn->sock->sk); |
2382 | *value = be16_to_cpu(inet->dport); | 2385 | *value = be16_to_cpu(inet->dport); |
2383 | mutex_unlock(&conn->xmitmutex); | 2386 | mutex_unlock(&conn->xmitmutex); |
2387 | case ISCSI_PARAM_EXP_STATSN: | ||
2388 | *value = conn->exp_statsn; | ||
2389 | break; | ||
2384 | default: | 2390 | default: |
2385 | return -EINVAL; | 2391 | return -EINVAL; |
2386 | } | 2392 | } |
@@ -2548,7 +2554,8 @@ static struct iscsi_transport iscsi_tcp_transport = { | |||
2548 | ISCSI_DATASEQ_INORDER_EN | | 2554 | ISCSI_DATASEQ_INORDER_EN | |
2549 | ISCSI_ERL | | 2555 | ISCSI_ERL | |
2550 | ISCSI_CONN_PORT | | 2556 | ISCSI_CONN_PORT | |
2551 | ISCSI_CONN_ADDRESS, | 2557 | ISCSI_CONN_ADDRESS | |
2558 | ISCSI_EXP_STATSN, | ||
2552 | .host_template = &iscsi_sht, | 2559 | .host_template = &iscsi_sht, |
2553 | .conndata_size = sizeof(struct iscsi_conn), | 2560 | .conndata_size = sizeof(struct iscsi_conn), |
2554 | .max_conn = 1, | 2561 | .max_conn = 1, |