summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_fcp.c
diff options
context:
space:
mode:
authorYi Zou2011-05-17 01:45:57 +0200
committerJames Bottomley2011-05-24 18:37:25 +0200
commit8467b96c035a45418c5db2619f396b7131b4efa8 (patch)
tree3ac398e8052932ebc1846b0d506b020a73d8ea9c /drivers/scsi/libfc/fc_fcp.c
parent[SCSI] libfc: fix race in SRR response (diff)
downloadkernel-qcow2-linux-8467b96c035a45418c5db2619f396b7131b4efa8.tar.gz
kernel-qcow2-linux-8467b96c035a45418c5db2619f396b7131b4efa8.tar.xz
kernel-qcow2-linux-8467b96c035a45418c5db2619f396b7131b4efa8.zip
[SCSI] libfc: do not immediately retry the cmd when seq_send fails in fc_fcp_send_data
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>
Diffstat (limited to 'drivers/scsi/libfc/fc_fcp.c')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 57704e814681..9cd2149519ac 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -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;
}