aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 10:35:34 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 10:35:34 -0800
commit365bbe0d0caaf2ba74d56556827babf0bc66965d (patch)
tree1b5bce452bc768398b19967a3123bd8c4adcb9f1 /drivers/scsi/iscsi_tcp.c
parent0bf98542a07ee1341830dcc4be63df85645f76b9 (diff)
parent3ef49a3b45c33b055002402f01e5da98cb773086 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (30 commits) [SCSI] qla1280: set residual correctly [SCSI] fusion: bump version [SCSI] fusion: MODULE_VERSION support [SCSI] fusion: power pc and miscellaneous bug fixs [SCSI] fusion: fibre channel: return DID_ERROR for MPI_IOCSTATUS_SCSI_IOC_TERMINATED [SCSI] megaraid_sas: Update module author [SCSI] 3ware 8000 serialize reset code [SCSI] sr: fix error code check in sr_block_ioctl() [SCSI] scsi: lpfc error path fix [SCSI] aacraid: Product List Update [SCSI] libiscsi: fix senselen calculation [SCSI] iscsi: simplify IPv6 and IPv4 address printing [SCSI] iscsi: newline in printk [SCSI] iscsi: fix crypto_alloc_hash() error check [SCSI] iscsi: fix 2.6.19 data digest calculation bug [SCSI] scsi_scan: fix report lun problems with CDROM or RBC devices [SCSI] qla2xxx: Update version number to 8.01.07-k4. [SCSI] qla2xxx: Use generic isp_ops.fw_dump() function. [SCSI] qla2xxx: Perform a fw-dump when an ISP23xx RISC-paused state is detected. [SCSI] qla2xxx: Correct reset handling logic. ...
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 d0b139cccbb..43768408437 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)
if (!offset)
crypto_hash_update(
&tcp_conn->rx_hash,
- &sg[i], 1);
+ &sg[i], sg[i].length);
else
partial_sg_digest_update(
&tcp_conn->rx_hash,
@@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
CRYPTO_ALG_ASYNC);
tcp_conn->tx_hash.flags = 0;
- if (!tcp_conn->tx_hash.tfm)
+ if (IS_ERR(tcp_conn->tx_hash.tfm))
goto free_tcp_conn;
tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
CRYPTO_ALG_ASYNC);
tcp_conn->rx_hash.flags = 0;
- if (!tcp_conn->rx_hash.tfm)
+ if (IS_ERR(tcp_conn->rx_hash.tfm))
goto free_tx_tfm;
return cls_conn;
@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
sk = tcp_conn->sock->sk;
if (sk->sk_family == PF_INET) {
inet = inet_sk(sk);
- len = sprintf(buf, "%u.%u.%u.%u\n",
+ len = sprintf(buf, NIPQUAD_FMT "\n",
NIPQUAD(inet->daddr));
} else {
np = inet6_sk(sk);
- len = sprintf(buf,
- "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
- NIP6(np->daddr));
+ len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
}
mutex_unlock(&conn->xmitmutex);
break;