When checking for the SUSPEND bit we have to make sure
to transfer complete PDUs, otherwise the target will barf.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 drivers/scsi/iscsi_tcp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index b508468..a3fe5bf 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -245,7 +245,8 @@ static int iscsi_sw_tcp_xmit_segment(struct iscsi_tcp_conn 
*tcp_conn,
                unsigned int offset, copy;
                int flags = 0;
 
-               if (test_bit(ISCSI_SUSPEND_BIT,
+               if (copied == 0 &&
+                   test_bit(ISCSI_SUSPEND_BIT,
                             &tcp_conn->iscsi_conn->suspend_tx)) {
                        r = -ENODATA;
                        goto unmap;
-- 
1.6.0.2


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to