Skip to content

Commit

Permalink
[SCSI] qla1280: set residual correctly
Browse files Browse the repository at this point in the history
Jeremy caught a bug in the qla1280 driver where it didn't set the
residual value correctly.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Jes Sorensen authored and James Bottomley committed Jan 6, 2007
1 parent d0a6b08 commit 3ef49a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/qla1280.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
int host_status = DID_ERROR;
uint16_t comp_status = le16_to_cpu(sts->comp_status);
uint16_t state_flags = le16_to_cpu(sts->state_flags);
uint16_t residual_length = le32_to_cpu(sts->residual_length);
uint32_t residual_length = le32_to_cpu(sts->residual_length);
uint16_t scsi_status = le16_to_cpu(sts->scsi_status);
#if DEBUG_QLA1280_INTR
static char *reason[] = {
Expand Down Expand Up @@ -1413,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
"scsi: Underflow detected - retrying "
"command.\n");
host_status = DID_ERROR;
} else
} else {
cp->resid = residual_length;
host_status = DID_OK;
}
break;

default:
Expand Down

0 comments on commit 3ef49a3

Please sign in to comment.