diff options
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 8f55e1431433..c9a3abf9e7b6 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) |
@@ -1777,14 +1777,24 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1778 | CRYPTO_ALG_ASYNC); | 1778 | CRYPTO_ALG_ASYNC); |
1779 | tcp_conn->tx_hash.flags = 0; | 1779 | tcp_conn->tx_hash.flags = 0; |
1780 | if (IS_ERR(tcp_conn->tx_hash.tfm)) | 1780 | if (IS_ERR(tcp_conn->tx_hash.tfm)) { |
1781 | printk(KERN_ERR "Could not create connection due to crc32c " | ||
1782 | "loading error %ld. Make sure the crc32c module is " | ||
1783 | "built as a module or into the kernel\n", | ||
1784 | PTR_ERR(tcp_conn->tx_hash.tfm)); | ||
1781 | goto free_tcp_conn; | 1785 | goto free_tcp_conn; |
1786 | } | ||
1782 | 1787 | ||
1783 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1788 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1784 | CRYPTO_ALG_ASYNC); | 1789 | CRYPTO_ALG_ASYNC); |
1785 | tcp_conn->rx_hash.flags = 0; | 1790 | tcp_conn->rx_hash.flags = 0; |
1786 | if (IS_ERR(tcp_conn->rx_hash.tfm)) | 1791 | if (IS_ERR(tcp_conn->rx_hash.tfm)) { |
1792 | printk(KERN_ERR "Could not create connection due to crc32c " | ||
1793 | "loading error %ld. Make sure the crc32c module is " | ||
1794 | "built as a module or into the kernel\n", | ||
1795 | PTR_ERR(tcp_conn->rx_hash.tfm)); | ||
1787 | goto free_tx_tfm; | 1796 | goto free_tx_tfm; |
1797 | } | ||
1788 | 1798 | ||
1789 | return cls_conn; | 1799 | return cls_conn; |
1790 | 1800 | ||
@@ -2138,6 +2148,7 @@ static struct scsi_host_template iscsi_sht = { | |||
2138 | .change_queue_depth = iscsi_change_queue_depth, | 2148 | .change_queue_depth = iscsi_change_queue_depth, |
2139 | .can_queue = ISCSI_XMIT_CMDS_MAX - 1, | 2149 | .can_queue = ISCSI_XMIT_CMDS_MAX - 1, |
2140 | .sg_tablesize = ISCSI_SG_TABLESIZE, | 2150 | .sg_tablesize = ISCSI_SG_TABLESIZE, |
2151 | .max_sectors = 0xFFFF, | ||
2141 | .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, | 2152 | .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, |
2142 | .eh_abort_handler = iscsi_eh_abort, | 2153 | .eh_abort_handler = iscsi_eh_abort, |
2143 | .eh_host_reset_handler = iscsi_eh_host_reset, | 2154 | .eh_host_reset_handler = iscsi_eh_host_reset, |