diff options
author | Jes Sorensen <jes@sgi.com> | 2007-01-05 12:05:37 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-06 10:33:18 -0500 |
commit | 3ef49a3b45c33b055002402f01e5da98cb773086 (patch) | |
tree | 21fd68dd4862002e3ef23460650af69bad9ab5d6 /drivers/scsi | |
parent | d0a6b08ae08c2ab292f756bdae0e8b1242696d7f (diff) |
[SCSI] qla1280: set residual correctly
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla1280.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 16af5b79e587..1548d42a3b43 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1341 | int host_status = DID_ERROR; | 1341 | int host_status = DID_ERROR; |
1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); | 1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); |
1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); | 1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); |
1344 | uint16_t residual_length = le32_to_cpu(sts->residual_length); | 1344 | uint32_t residual_length = le32_to_cpu(sts->residual_length); |
1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); | 1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); |
1346 | #if DEBUG_QLA1280_INTR | 1346 | #if DEBUG_QLA1280_INTR |
1347 | static char *reason[] = { | 1347 | static char *reason[] = { |
@@ -1413,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1413 | "scsi: Underflow detected - retrying " | 1413 | "scsi: Underflow detected - retrying " |
1414 | "command.\n"); | 1414 | "command.\n"); |
1415 | host_status = DID_ERROR; | 1415 | host_status = DID_ERROR; |
1416 | } else | 1416 | } else { |
1417 | cp->resid = residual_length; | ||
1417 | host_status = DID_OK; | 1418 | host_status = DID_OK; |
1419 | } | ||
1418 | break; | 1420 | break; |
1419 | 1421 | ||
1420 | default: | 1422 | default: |