qla2xxx: Fix sign of FCP_RESID field for status with RESID_OVER
Subsystems (2)
PATCH 1/1 qla2xxx: Fix sign of FCP_RESID field for status with RESID_OVER
From: Roland Dreier <[email protected]>
We don't need to change the sign of our prm->residual field; the target core sets a flag to distinguish overflow and underflow, but se_cmd->residual_count is always positive. The existing code seems to be a carryover from the port from scst, which uses the sign of the residual field to distinguish overflow and underflow.
--- drivers/scsi/qla2xxx/qla_target.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +0 -1
@@ -1808,7 +1808,6 @@ static int qla_tgt_pre_xmit_response(struct qla_tgt_cmd *cmd, struct qla_tgt_prm se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0 ] :0 , cmd->bufflen, prm->rq_result); prm->rq_result |=SS_RESIDUAL_OVER ; - prm->residual = -prm->residual; }if (xmit_type &QLA_TGT_XMIT_STATUS ) {
Signature · 1 line
1.7.9
Nicholas A. Bellinger
AppliedQuoted 18 lines · Roland Dreier
From: Roland Dreier <[email protected]>
We don't need to change the sign of our
prm->residualfield; the target core sets a flag to distinguish overflow and underflow, butse_cmd->residual_countis always positive. The existing code seems to be a carryover from the port from scst, which uses the sign of the residual field to distinguish overflow and underflow.Signed-off-by Roland Dreier <[email protected]>--- drivers/scsi/qla2xxx/qla_target.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)drivers/scsi/qla2xxx/qla_target.c +0
-0
drivers/scsi/qla2xxx/qla_target.c static int qla_tgt_pre_xmit_response(struct qla_tgt_cmd *cmd, struct qla_tgt_prm · line 1813
Quoted 7 lines
drivers/scsi/qla2xxx/qla_target.c +0
-1@@ -1808,7 +1808,6 @@ static int qla_tgt_pre_xmit_response(struct qla_tgt_cmd *cmd, struct qla_tgt_prm se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0 ] :0 , cmd->bufflen, prm->rq_result); prm->rq_result |=SS_RESIDUAL_OVER ; - prm->residual = -prm->residual; }if (xmit_type &QLA_TGT_XMIT_STATUS ) {
Applied. Thanks Roland!
--nab