]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] libfc: do not immediately retry the cmd when seq_send fails in fc_fcp_send_data
authorYi Zou <yi.zou@intel.com>
Mon, 16 May 2011 23:45:57 +0000 (16:45 -0700)
committerJames Bottomley <jbottomley@parallels.com>
Tue, 24 May 2011 16:37:25 +0000 (12:37 -0400)
Currently, when seq_send() fails in fc_fcp_send_data(),
fc_fcp_retry_cmd() would complete this failed I/O directly and let
scsi-ml retry. However, target side is not notified which may hang the
target. Instead, we should just bail out from from fc_fcp_send_data
and let scsi-ml times it out and aborts this I/O instead.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
drivers/scsi/libfc/fc_fcp.c

index 57704e814681e9c098a67e4abf3858375d26cb17..9cd2149519ace23d9dbbff8fa7d28b1c5e2acdf5 100644 (file)
@@ -681,8 +681,7 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
                error = lport->tt.seq_send(lport, seq, fp);
                if (error) {
                        WARN_ON(1);             /* send error should be rare */
-                       fc_fcp_retry_cmd(fsp);
-                       return 0;
+                       return error;
                }
                fp = NULL;
        }