aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorLalit Chandivade <lalit.chandivade@qlogic.com>2010-09-03 14:57:04 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 15:18:31 -0300
commit0374f55ed882a46cd4825dde16ca2392d4c367f6 (patch)
treea3ef88e6d67597555f2a4ac9e15b8d52216a4e24 /drivers/scsi/qla2xxx
parent4142b1987f1f8ba90589642cb74566eaff3dc2e9 (diff)
downloadkernel_samsung_tuna-0374f55ed882a46cd4825dde16ca2392d4c367f6.zip
kernel_samsung_tuna-0374f55ed882a46cd4825dde16ca2392d4c367f6.tar.gz
kernel_samsung_tuna-0374f55ed882a46cd4825dde16ca2392d4c367f6.tar.bz2
[SCSI] qla2xxx: Cover UNDERRUN case where SCSI status is set.
Currently, if target sets the SCSI Status (with Check condition) and there is no FCP residual bit set then driver does not check for dropped frame. This could lead to data corruption. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 6982ba7..28f65be 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1706,19 +1706,20 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
cp->result = DID_ERROR << 16;
break;
}
- } else if (!lscsi_status) {
+ } else {
DEBUG2(qla_printk(KERN_INFO, ha,
"scsi(%ld:%d:%d) Dropped frame(s) detected (0x%x "
"of 0x%x bytes).\n", vha->host_no, cp->device->id,
cp->device->lun, resid, scsi_bufflen(cp)));
- cp->result = DID_ERROR << 16;
- break;
+ cp->result = DID_ERROR << 16 | lscsi_status;
+ goto check_scsi_status;
}
cp->result = DID_OK << 16 | lscsi_status;
logit = 0;
+check_scsi_status:
/*
* Check to see if SCSI Status is non zero. If so report SCSI
* Status.