Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115472
b: refs/heads/master
c: 6f481e3
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Oct 13, 2008
1 parent 64220a3 commit f8a7459
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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: 8e12452549ba2dfa17db97bc495172fac221a7ab
refs/heads/master: 6f481e3cefeb33094e87af176587e6a3027f104e
12 changes: 7 additions & 5 deletions trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ iscsi_tcp_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,

error:
debug_tcp("Error receiving PDU, errno=%d\n", rc);
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
iscsi_conn_failure(conn, rc);
return 0;
}

Expand Down Expand Up @@ -1098,8 +1098,10 @@ iscsi_xmit(struct iscsi_conn *conn)

while (1) {
rc = iscsi_tcp_xmit_segment(tcp_conn, segment);
if (rc < 0)
if (rc < 0) {
rc = ISCSI_ERR_XMIT_FAILED;
goto error;
}
if (rc == 0)
break;

Expand All @@ -1108,7 +1110,7 @@ iscsi_xmit(struct iscsi_conn *conn)
if (segment->total_copied >= segment->total_size) {
if (segment->done != NULL) {
rc = segment->done(tcp_conn, segment);
if (rc < 0)
if (rc != 0)
goto error;
}
}
Expand All @@ -1123,8 +1125,8 @@ iscsi_xmit(struct iscsi_conn *conn)
/* Transmit error. We could initiate error recovery
* here. */
debug_tcp("Error sending PDU, errno=%d\n", rc);
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
return rc;
iscsi_conn_failure(conn, rc);
return -EIO;
}

/**
Expand Down
1 change: 1 addition & 0 deletions trunk/include/scsi/iscsi_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ enum iscsi_err {
ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16,
ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17,
ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18,
ISCSI_ERR_XMIT_FAILED = ISCSI_ERR_BASE + 19,
};

/*
Expand Down

0 comments on commit f8a7459

Please sign in to comment.