diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-10-19 15:59:18 -0700 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-23 15:54:41 -0400 |
commit | 6acf8190025e9c4ea513d4084ff089d476112816 (patch) | |
tree | d91f79a0afcb36abc91d1bbf2dc8c98d7f6ac869 /drivers/scsi/qla2xxx | |
parent | 285d0321d15cf3130b3347a207ceae652ccc95b5 (diff) | |
download | blackbird-op-linux-6acf8190025e9c4ea513d4084ff089d476112816.tar.gz blackbird-op-linux-6acf8190025e9c4ea513d4084ff089d476112816.zip |
[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>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index c4768c4f3990..1104bd2eed40 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -1012,8 +1012,14 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) case CS_DATA_UNDERRUN: resid = resid_len; /* Use F/W calculated residual length. */ - if (IS_FWI2_CAPABLE(ha)) + if (IS_FWI2_CAPABLE(ha)) { + if (scsi_status & SS_RESIDUAL_UNDER && + resid != fw_resid_len) { + scsi_status &= ~SS_RESIDUAL_UNDER; + lscsi_status = 0; + } resid = fw_resid_len; + } if (scsi_status & SS_RESIDUAL_UNDER) { scsi_set_resid(cp, resid); |