diff options
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 2 | ||||
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 6 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 2 | ||||
-rw-r--r-- | include/scsi/iscsi_proto.h | 12 |
4 files changed, 16 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 89e37283c836..3261bb327281 100644 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ b/drivers/infiniband/ulp/iser/iser_initiator.c | |||
@@ -201,7 +201,7 @@ static int iser_post_receive_control(struct iscsi_conn *conn) | |||
201 | * what's common for both schemes is that the connection is not started | 201 | * what's common for both schemes is that the connection is not started |
202 | */ | 202 | */ |
203 | if (conn->c_stage != ISCSI_CONN_STARTED) | 203 | if (conn->c_stage != ISCSI_CONN_STARTED) |
204 | rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; | 204 | rx_data_size = ISCSI_DEF_MAX_RECV_SEG_LEN; |
205 | else /* FIXME till user space sets conn->max_recv_dlength correctly */ | 205 | else /* FIXME till user space sets conn->max_recv_dlength correctly */ |
206 | rx_data_size = 128; | 206 | rx_data_size = 128; |
207 | 207 | ||
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 8f55e1431433..6fd084583491 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -527,12 +527,12 @@ iscsi_tcp_hdr_recv(struct iscsi_conn *conn) | |||
527 | * than 8K, but there are no targets that currently do this. | 527 | * than 8K, but there are no targets that currently do this. |
528 | * For now we fail until we find a vendor that needs it | 528 | * For now we fail until we find a vendor that needs it |
529 | */ | 529 | */ |
530 | if (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH < | 530 | if (ISCSI_DEF_MAX_RECV_SEG_LEN < |
531 | tcp_conn->in.datalen) { | 531 | tcp_conn->in.datalen) { |
532 | printk(KERN_ERR "iscsi_tcp: received buffer of len %u " | 532 | printk(KERN_ERR "iscsi_tcp: received buffer of len %u " |
533 | "but conn buffer is only %u (opcode %0x)\n", | 533 | "but conn buffer is only %u (opcode %0x)\n", |
534 | tcp_conn->in.datalen, | 534 | tcp_conn->in.datalen, |
535 | DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, opcode); | 535 | ISCSI_DEF_MAX_RECV_SEG_LEN, opcode); |
536 | rc = ISCSI_ERR_PROTO; | 536 | rc = ISCSI_ERR_PROTO; |
537 | break; | 537 | break; |
538 | } | 538 | } |
@@ -1762,7 +1762,7 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1762 | * due to strange issues with iser these are not set | 1762 | * due to strange issues with iser these are not set |
1763 | * in iscsi_conn_setup | 1763 | * in iscsi_conn_setup |
1764 | */ | 1764 | */ |
1765 | conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; | 1765 | conn->max_recv_dlength = ISCSI_DEF_MAX_RECV_SEG_LEN; |
1766 | 1766 | ||
1767 | tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); | 1767 | tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); |
1768 | if (!tcp_conn) | 1768 | if (!tcp_conn) |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 0ad484f87b1d..04707d667c9d 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1520,7 +1520,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1520 | } | 1520 | } |
1521 | spin_unlock_bh(&session->lock); | 1521 | spin_unlock_bh(&session->lock); |
1522 | 1522 | ||
1523 | data = kmalloc(DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, GFP_KERNEL); | 1523 | data = kmalloc(ISCSI_DEF_MAX_RECV_SEG_LEN, GFP_KERNEL); |
1524 | if (!data) | 1524 | if (!data) |
1525 | goto login_mtask_data_alloc_fail; | 1525 | goto login_mtask_data_alloc_fail; |
1526 | conn->login_mtask->data = conn->data = data; | 1526 | conn->login_mtask->data = conn->data = data; |
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h index 4a44278ed768..8d1e4e8026fe 100644 --- a/include/scsi/iscsi_proto.h +++ b/include/scsi/iscsi_proto.h | |||
@@ -588,7 +588,17 @@ struct iscsi_reject { | |||
588 | #define VALUE_MAXLEN 255 | 588 | #define VALUE_MAXLEN 255 |
589 | #define TARGET_NAME_MAXLEN VALUE_MAXLEN | 589 | #define TARGET_NAME_MAXLEN VALUE_MAXLEN |
590 | 590 | ||
591 | #define DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 8192 | 591 | #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192 |
592 | #define ISCSI_MIN_MAX_RECV_SEG_LEN 512 | ||
593 | #define ISCSI_MAX_MAX_RECV_SEG_LEN 16777215 | ||
594 | |||
595 | #define ISCSI_DEF_FIRST_BURST_LEN 65536 | ||
596 | #define ISCSI_MIN_FIRST_BURST_LEN 512 | ||
597 | #define ISCSI_MAX_FIRST_BURST_LEN 16777215 | ||
598 | |||
599 | #define ISCSI_DEF_MAX_BURST_LEN 262144 | ||
600 | #define ISCSI_MIN_MAX_BURST_LEN 512 | ||
601 | #define ISCSI_MAX_MAX_BURST_LEN 16777215 | ||
592 | 602 | ||
593 | /************************* RFC 3720 End *****************************/ | 603 | /************************* RFC 3720 End *****************************/ |
594 | 604 | ||