]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Fri, 12 Sep 2008 04:22:52 +0000 (21:22 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 3 Oct 2008 16:46:18 +0000 (11:46 -0500)
Add additional tightening of residual-count handling (originally
from commit 6acf8190025e9c4ea513d4084ff089d476112816) where the
driver should discard any lower SCSI-status during
firmware/transport residual-count mismatches.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_isr.c

index 92cab5c35be523deba59f8b6f233e29ac4df3ff1..9eb6ef33304486df9af4d1594391ab7b62196748 100644 (file)
@@ -1060,8 +1060,9 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
                resid = resid_len;
                /* Use F/W calculated residual length. */
                if (IS_FWI2_CAPABLE(ha)) {
-                       if (scsi_status & SS_RESIDUAL_UNDER &&
-                           resid != fw_resid_len) {
+                       if (!(scsi_status & SS_RESIDUAL_UNDER)) {
+                               lscsi_status = 0;
+                       } else if (resid != fw_resid_len) {
                                scsi_status &= ~SS_RESIDUAL_UNDER;
                                lscsi_status = 0;
                        }