aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/iscsi_tcp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 4f096de81525..ed6c54cae7b1 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -979,7 +979,7 @@ iscsi_tcp_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
979 979
980error: 980error:
981 debug_tcp("Error receiving PDU, errno=%d\n", rc); 981 debug_tcp("Error receiving PDU, errno=%d\n", rc);
982 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 982 iscsi_conn_failure(conn, rc);
983 return 0; 983 return 0;
984} 984}
985 985
@@ -1098,8 +1098,10 @@ iscsi_xmit(struct iscsi_conn *conn)
1098 1098
1099 while (1) { 1099 while (1) {
1100 rc = iscsi_tcp_xmit_segment(tcp_conn, segment); 1100 rc = iscsi_tcp_xmit_segment(tcp_conn, segment);
1101 if (rc < 0) 1101 if (rc < 0) {
1102 rc = ISCSI_ERR_XMIT_FAILED;
1102 goto error; 1103 goto error;
1104 }
1103 if (rc == 0) 1105 if (rc == 0)
1104 break; 1106 break;
1105 1107
@@ -1108,7 +1110,7 @@ iscsi_xmit(struct iscsi_conn *conn)
1108 if (segment->total_copied >= segment->total_size) { 1110 if (segment->total_copied >= segment->total_size) {
1109 if (segment->done != NULL) { 1111 if (segment->done != NULL) {
1110 rc = segment->done(tcp_conn, segment); 1112 rc = segment->done(tcp_conn, segment);
1111 if (rc < 0) 1113 if (rc != 0)
1112 goto error; 1114 goto error;
1113 } 1115 }
1114 } 1116 }
@@ -1123,8 +1125,8 @@ error:
1123 /* Transmit error. We could initiate error recovery 1125 /* Transmit error. We could initiate error recovery
1124 * here. */ 1126 * here. */
1125 debug_tcp("Error sending PDU, errno=%d\n", rc); 1127 debug_tcp("Error sending PDU, errno=%d\n", rc);
1126 iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); 1128 iscsi_conn_failure(conn, rc);
1127 return rc; 1129 return -EIO;
1128} 1130}
1129 1131
1130/** 1132/**