aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r--drivers/scsi/iscsi_tcp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index c0ce6ab81a9d..d94038eafb9b 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -922,11 +922,8 @@ more:
922 922
923 rc = iscsi_data_recv(conn); 923 rc = iscsi_data_recv(conn);
924 if (rc) { 924 if (rc) {
925 if (rc == -EAGAIN) { 925 if (rc == -EAGAIN)
926 rd_desc->count = tcp_conn->in.datalen -
927 tcp_conn->in.ctask->data_count;
928 goto again; 926 goto again;
929 }
930 iscsi_conn_failure(conn, rc); 927 iscsi_conn_failure(conn, rc);
931 return 0; 928 return 0;
932 } 929 }
@@ -983,9 +980,14 @@ iscsi_tcp_data_ready(struct sock *sk, int flag)
983 980
984 read_lock(&sk->sk_callback_lock); 981 read_lock(&sk->sk_callback_lock);
985 982
986 /* use rd_desc to pass 'conn' to iscsi_tcp_data_recv */ 983 /*
984 * Use rd_desc to pass 'conn' to iscsi_tcp_data_recv.
985 * We set count to 1 because we want the network layer to
986 * hand us all the skbs that are available. iscsi_tcp_data_recv
987 * handled pdus that cross buffers or pdus that still need data.
988 */
987 rd_desc.arg.data = conn; 989 rd_desc.arg.data = conn;
988 rd_desc.count = 0; 990 rd_desc.count = 1;
989 tcp_read_sock(sk, &rd_desc, iscsi_tcp_data_recv); 991 tcp_read_sock(sk, &rd_desc, iscsi_tcp_data_recv);
990 992
991 read_unlock(&sk->sk_callback_lock); 993 read_unlock(&sk->sk_callback_lock);