提交 0374f55e 编写于 作者: L Lalit Chandivade 提交者: James Bottomley

[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: NGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 4142b198
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册