Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33564
b: refs/heads/master
c: 40527af
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jul 28, 2006
1 parent aabb09b commit efd8a5b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8dc1e523b0f1e6dd71cdabd8c7d7587c6dc27f9
refs/heads/master: 40527afea1a3b18ee5754e17d6f807176e03f1f2
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
}
tcp_conn->in_progress = IN_PROGRESS_DATA_RECV;
} else if (rc) {
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
iscsi_conn_failure(conn, rc);
return 0;
}
}
Expand Down
27 changes: 18 additions & 9 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
* login related PDU's exp_statsn is handled in
* userspace
*/
rc = iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen);
if (iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen))
rc = ISCSI_ERR_CONN_FAILED;
list_del(&mtask->running);
if (conn->login_mtask != mtask)
__kfifo_put(session->mgmtpool.queue,
Expand All @@ -393,7 +394,8 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
}
conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1;

rc = iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen);
if (iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen))
rc = ISCSI_ERR_CONN_FAILED;
list_del(&mtask->running);
if (conn->login_mtask != mtask)
__kfifo_put(session->mgmtpool.queue,
Expand All @@ -406,14 +408,21 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
} else if (itt == ISCSI_RESERVED_TAG) {
switch(opcode) {
case ISCSI_OP_NOOP_IN:
if (!datalen) {
rc = iscsi_check_assign_cmdsn(session,
(struct iscsi_nopin*)hdr);
if (!rc && hdr->ttt != ISCSI_RESERVED_TAG)
rc = iscsi_recv_pdu(conn->cls_conn,
hdr, NULL, 0);
} else
if (datalen) {
rc = ISCSI_ERR_PROTO;
break;
}

rc = iscsi_check_assign_cmdsn(session,
(struct iscsi_nopin*)hdr);
if (rc)
break;

if (hdr->ttt == ISCSI_RESERVED_TAG)
break;

if (iscsi_recv_pdu(conn->cls_conn, hdr, NULL, 0))
rc = ISCSI_ERR_CONN_FAILED;
break;
case ISCSI_OP_REJECT:
/* we need sth like iscsi_reject_rsp()*/
Expand Down

0 comments on commit efd8a5b

Please sign in to comment.