[SCSI] qla2xxx: Correct residual-count handling discrepancies during UNDERRUN handling.

For recent ISPs, software during CS_UNDERRUN handling must
determine if the two residuals, firmware-calculated and FCP_RSP,
are different to recognize if a frame has been dropped. Update
the driver to catch this condition, and clear the
SS_RESIDUAL_UNDER and lscsi_status bits. This logic is
consistent with what earlier firmwares did by explicitly
cracking open the FCP_RSP statuses and clearing
SS_RESIDUAL_UNDER.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by Andrew Vasquez and committed by James Bottomley 6acf8190 285d0321

+7 -1
+7 -1
drivers/scsi/qla2xxx/qla_isr.c
··· 1012 1012 case CS_DATA_UNDERRUN: 1013 1013 resid = resid_len; 1014 1014 /* Use F/W calculated residual length. */ 1015 - if (IS_FWI2_CAPABLE(ha)) 1015 + if (IS_FWI2_CAPABLE(ha)) { 1016 + if (scsi_status & SS_RESIDUAL_UNDER && 1017 + resid != fw_resid_len) { 1018 + scsi_status &= ~SS_RESIDUAL_UNDER; 1019 + lscsi_status = 0; 1020 + } 1016 1021 resid = fw_resid_len; 1022 + } 1017 1023 1018 1024 if (scsi_status & SS_RESIDUAL_UNDER) { 1019 1025 scsi_set_resid(cp, resid);