Skip to content

Commit

Permalink
[SCSI] qla2xxx: Correct residual-count handling discrepancies during …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 23, 2007
1 parent 285d032 commit 6acf819
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6acf819

Please sign in to comment.