We should be flushing the workqueue before setting the suspend
bit. If we don't a LU Reset might kill commands which are already
in the queue and waiting to be send, causing the target to barf.

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

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index c58de26..e15ea86 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1864,9 +1864,9 @@ void iscsi_suspend_tx(struct iscsi_conn *conn)
        struct Scsi_Host *shost = conn->session->host;
        struct iscsi_host *ihost = shost_priv(shost);
-       set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
        if (ihost->workq)
+       set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);

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 
For more options, visit this group at http://groups.google.com/group/open-iscsi

Reply via email to