aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r--drivers/scsi/iscsi_tcp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index d0b139cccbbc..437684084377 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn)
749 if (!offset) 749 if (!offset)
750 crypto_hash_update( 750 crypto_hash_update(
751 &tcp_conn->rx_hash, 751 &tcp_conn->rx_hash,
752 &sg[i], 1); 752 &sg[i], sg[i].length);
753 else 753 else
754 partial_sg_digest_update( 754 partial_sg_digest_update(
755 &tcp_conn->rx_hash, 755 &tcp_conn->rx_hash,
@@ -1777,13 +1777,13 @@ 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 (!tcp_conn->tx_hash.tfm) 1780 if (IS_ERR(tcp_conn->tx_hash.tfm))
1781 goto free_tcp_conn; 1781 goto free_tcp_conn;
1782 1782
1783 tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, 1783 tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
1784 CRYPTO_ALG_ASYNC); 1784 CRYPTO_ALG_ASYNC);
1785 tcp_conn->rx_hash.flags = 0; 1785 tcp_conn->rx_hash.flags = 0;
1786 if (!tcp_conn->rx_hash.tfm) 1786 if (IS_ERR(tcp_conn->rx_hash.tfm))
1787 goto free_tx_tfm; 1787 goto free_tx_tfm;
1788 1788
1789 return cls_conn; 1789 return cls_conn;
@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
2044 sk = tcp_conn->sock->sk; 2044 sk = tcp_conn->sock->sk;
2045 if (sk->sk_family == PF_INET) { 2045 if (sk->sk_family == PF_INET) {
2046 inet = inet_sk(sk); 2046 inet = inet_sk(sk);
2047 len = sprintf(buf, "%u.%u.%u.%u\n", 2047 len = sprintf(buf, NIPQUAD_FMT "\n",
2048 NIPQUAD(inet->daddr)); 2048 NIPQUAD(inet->daddr));
2049 } else { 2049 } else {
2050 np = inet6_sk(sk); 2050 np = inet6_sk(sk);
2051 len = sprintf(buf, 2051 len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
2052 "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
2053 NIP6(np->daddr));
2054 } 2052 }
2055 mutex_unlock(&conn->xmitmutex); 2053 mutex_unlock(&conn->xmitmutex);
2056 break; 2054 break;