aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2009-02-27 13:55:07 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-06 16:40:06 -0500
commit26d9cab558f901051d0b69b2c445c8588931ce8d (patch)
tree5b7a89a39ba823ef1d1583971a3ec16906aadd83 /drivers/scsi/libfc
parent6755db1cd4587084be85f860b7aa7c0cc9d776dc (diff)
[SCSI] libfc: fixed a read IO data integrity issue when a IO data frame lost
The fc_fcp_complete_locked detected data underrun in this case and set the FC_DATA_UNDRUN but that was ignored by fc_io_compl for all cases including read underrun. Added code to not to ignore FC_DATA_UNDRUN for read IO and instead suggested scsi-ml to retry cmd to recover from lost data frame. Not sure if it is okay to ignore FC_DATA_UNDRUN for other case, so let code as is for other cases but removed or-ing with zero valued fsp->cdb_status for those cases. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index f440aaca39c2..ecc72612c385 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1810,12 +1810,12 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp)
1810 sc_cmd->result = DID_ERROR << 16; 1810 sc_cmd->result = DID_ERROR << 16;
1811 break; 1811 break;
1812 case FC_DATA_UNDRUN: 1812 case FC_DATA_UNDRUN:
1813 if (fsp->cdb_status == 0) { 1813 if ((fsp->cdb_status == 0) && !(fsp->req_flags & FC_SRB_READ)) {
1814 /* 1814 /*
1815 * scsi status is good but transport level 1815 * scsi status is good but transport level
1816 * underrun. for read it should be an error?? 1816 * underrun.
1817 */ 1817 */
1818 sc_cmd->result = (DID_OK << 16) | fsp->cdb_status; 1818 sc_cmd->result = DID_OK << 16;
1819 } else { 1819 } else {
1820 /* 1820 /*
1821 * scsi got underrun, this is an error 1821 * scsi got underrun, this is an error