qla2xxx: use F/W calculated residual length.
Subsystems (2)
PATCH 1/1 qla2xxx: use F/W calculated residual length.
Hi,
When comp_status is CS_DATA_OVERRUN, residual length calculated by F/W, but when comp_status is CS_COMMPLETE, residual length just set to residual count, at here calculated residual length may via F/W?
Please review.
--- qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_isr.c +1 -1
@@ -1398,7 +1398,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)break ; }if (scsi_status & (SS_RESIDUAL_UNDER |SS_RESIDUAL_OVER )) { - resid = resid_len; + resid =IS_FWI2_CAPABLE (ha) ? fw_resid_len : resid_len;scsi_set_resid (cp, resid); if (!lscsi_status &&
Quoted 5 lines · Joe Jin
Hi,
When
comp_statusisCS_DATA_OVERRUN, residual length calculated by F/W, but whencomp_statusisCS_COMMPLETE, residual length just set to residual count, at here calculated residual length may via F/W?
In case of good scsi completion with residual flag set, then firmware does not report the residual information, hence, driver depends upon the scsi residual obtained from target. The code does this now.
In case of over-run condition driver reports DID_ERROR to mid layer.
In case of under-run condition, the firmware detects and reports under run length which can be different from what obtained from target. Hence, driver gives preference to firmware reported residual length.
Quoted 31 lines
Please review.
Signed-off-by Joe Jin <[email protected]>CC Andrew Vasquez <[email protected]>---
qla_isr.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/qla2xxx/qla_isr.c +1
-1@@ -1398,7 +1398,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) break; }if (scsi_status & (SS_RESIDUAL_UNDER |SS_RESIDUAL_OVER )) { - resid = resid_len; + resid =IS_FWI2_CAPABLE (ha) ? fw_resid_len : resid_len;scsi_set_resid (cp, resid);if (!lscsi_status &&--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html