projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mmc: clean up unused parts of block driver
[powerpc.git]
/
drivers
/
scsi
/
iscsi_tcp.c
diff --git
a/drivers/scsi/iscsi_tcp.c
b/drivers/scsi/iscsi_tcp.c
index
d0b139c
..
c9a3abf
100644
(file)
--- a/
drivers/scsi/iscsi_tcp.c
+++ b/
drivers/scsi/iscsi_tcp.c
@@
-527,12
+527,12
@@
iscsi_tcp_hdr_recv(struct iscsi_conn *conn)
* than 8K, but there are no targets that currently do this.
* For now we fail until we find a vendor that needs it
*/
* than 8K, but there are no targets that currently do this.
* For now we fail until we find a vendor that needs it
*/
- if (
DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
<
+ if (
ISCSI_DEF_MAX_RECV_SEG_LEN
<
tcp_conn->in.datalen) {
printk(KERN_ERR "iscsi_tcp: received buffer of len %u "
"but conn buffer is only %u (opcode %0x)\n",
tcp_conn->in.datalen,
tcp_conn->in.datalen) {
printk(KERN_ERR "iscsi_tcp: received buffer of len %u "
"but conn buffer is only %u (opcode %0x)\n",
tcp_conn->in.datalen,
-
DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
, opcode);
+
ISCSI_DEF_MAX_RECV_SEG_LEN
, opcode);
rc = ISCSI_ERR_PROTO;
break;
}
rc = ISCSI_ERR_PROTO;
break;
}
@@
-749,7
+749,7
@@
static int iscsi_scsi_data_in(struct iscsi_conn *conn)
if (!offset)
crypto_hash_update(
&tcp_conn->rx_hash,
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,
else
partial_sg_digest_update(
&tcp_conn->rx_hash,
@@
-1375,7
+1375,7
@@
iscsi_tcp_mtask_xmit(struct iscsi_conn *conn, struct iscsi_mgmt_task *mtask)
}
BUG_ON(tcp_mtask->xmstate != XMSTATE_IDLE);
}
BUG_ON(tcp_mtask->xmstate != XMSTATE_IDLE);
- if (mtask->hdr->itt ==
cpu_to_be32(ISCSI_RESERVED_TAG)
) {
+ if (mtask->hdr->itt ==
RESERVED_ITT
) {
struct iscsi_session *session = conn->session;
spin_lock_bh(&session->lock);
struct iscsi_session *session = conn->session;
spin_lock_bh(&session->lock);
@@
-1762,7
+1762,7
@@
iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
* due to strange issues with iser these are not set
* in iscsi_conn_setup
*/
* due to strange issues with iser these are not set
* in iscsi_conn_setup
*/
- conn->max_recv_dlength =
DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
;
+ conn->max_recv_dlength =
ISCSI_DEF_MAX_RECV_SEG_LEN
;
tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL);
if (!tcp_conn)
tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL);
if (!tcp_conn)
@@
-1777,14
+1777,24
@@
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;
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)) {
+ printk(KERN_ERR "Could not create connection due to crc32c "
+ "loading error %ld. Make sure the crc32c module is "
+ "built as a module or into the kernel\n",
+ PTR_ERR(tcp_conn->tx_hash.tfm));
goto free_tcp_conn;
goto free_tcp_conn;
+ }
tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
CRYPTO_ALG_ASYNC);
tcp_conn->rx_hash.flags = 0;
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)) {
+ printk(KERN_ERR "Could not create connection due to crc32c "
+ "loading error %ld. Make sure the crc32c module is "
+ "built as a module or into the kernel\n",
+ PTR_ERR(tcp_conn->rx_hash.tfm));
goto free_tx_tfm;
goto free_tx_tfm;
+ }
return cls_conn;
return cls_conn;
@@
-2044,13
+2054,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);
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);
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;
}
mutex_unlock(&conn->xmitmutex);
break;
@@
-2140,6
+2148,7
@@
static struct scsi_host_template iscsi_sht = {
.change_queue_depth = iscsi_change_queue_depth,
.can_queue = ISCSI_XMIT_CMDS_MAX - 1,
.sg_tablesize = ISCSI_SG_TABLESIZE,
.change_queue_depth = iscsi_change_queue_depth,
.can_queue = ISCSI_XMIT_CMDS_MAX - 1,
.sg_tablesize = ISCSI_SG_TABLESIZE,
+ .max_sectors = 0xFFFF,
.cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset,
.cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset,