summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-11-30 16:19:20 -0800
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 12:24:25 -0600
commitd889b30a9196c453120ca54323fe80acb4c27b94 (patch)
tree4625c193d2a7b2ae2c6f23f3cfed0e6ea84a2754
parent9b90dc80ba2e566a48585174b1e5ab00e16f0456 (diff)
[SCSI] libfc: do not fc_io_compl on fsp w/o any scsi_cmnd associated
Do not call fc_io_compl() on fsp w/o any scsi_cmnd, e.g., lun reset is built inside fc_fcp, not from a scsi command from queuecommnd from scsi-ml, so in in case target is buggy that is invalid flags in the FCP_RSP, as we have seen in some SAN Blaze target where all bits in flags are 0, we do not want to call io_compl on this fsp. [ Comment block added by Robert Love ] Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/libfc/fc_fcp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index a36c652edbba..47c930a01454 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -973,7 +973,13 @@ static void fc_fcp_complete_locked(struct fc_fcp_pkt *fsp)
}
lport->tt.exch_done(seq);
}
- fc_io_compl(fsp);
+ /*
+ * Some resets driven by SCSI are not I/Os and do not have
+ * SCSI commands associated with the requests. We should not
+ * call I/O completion if we do not have a SCSI command.
+ */
+ if (fsp->cmd)
+ fc_io_compl(fsp);
}
/**