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.

Signed-off-by: Yi Zou <[email protected]>
---

 drivers/scsi/libfc/fc_fcp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index efea158..b277382 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -973,7 +973,8 @@ static void fc_fcp_complete_locked(struct fc_fcp_pkt *fsp)
                }
                lport->tt.exch_done(seq);
        }
-       fc_io_compl(fsp);
+       if (fsp->cmd)
+               fc_io_compl(fsp);
 }
 
 /**

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to