[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>

authored by Lalit Chandivade and committed by James Bottomley 0374f55e 4142b198

+4 -3
+4 -3
drivers/scsi/qla2xxx/qla_isr.c
··· 1706 1706 cp->result = DID_ERROR << 16; 1707 1707 break; 1708 1708 } 1709 - } else if (!lscsi_status) { 1709 + } else { 1710 1710 DEBUG2(qla_printk(KERN_INFO, ha, 1711 1711 "scsi(%ld:%d:%d) Dropped frame(s) detected (0x%x " 1712 1712 "of 0x%x bytes).\n", vha->host_no, cp->device->id, 1713 1713 cp->device->lun, resid, scsi_bufflen(cp))); 1714 1714 1715 - cp->result = DID_ERROR << 16; 1716 - break; 1715 + cp->result = DID_ERROR << 16 | lscsi_status; 1716 + goto check_scsi_status; 1717 1717 } 1718 1718 1719 1719 cp->result = DID_OK << 16 | lscsi_status; 1720 1720 logit = 0; 1721 1721 1722 + check_scsi_status: 1722 1723 /* 1723 1724 * Check to see if SCSI Status is non zero. If so report SCSI 1724 1725 * Status.