Skip to content

Commit

Permalink
[SCSI] libfc: do not fc_io_compl on fsp w/o any scsi_cmnd associated
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yi Zou authored and James Bottomley committed Dec 21, 2010
1 parent 9b90dc8 commit d889b30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit d889b30

Please sign in to comment.