aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_hipd.c
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2007-11-06 16:07:04 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-07 19:02:34 -0500
commit3dfcb701e1ff7aa21d6623e46b6ec3f7d0d306e1 (patch)
tree7ae253a2611085eb01d62439f881f798beaf31b1 /drivers/scsi/sym53c8xx_2/sym_hipd.c
parent51883b5e60796cce556370dbc368fd22c60c0e3e (diff)
[SCSI] sym53c8xx: fix resid calculation
This patch fixes the calculation of the data transfer residual for the case of a command that is supposed to transfer an odd number of bytes on a wide bus but transfers nothing instead. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Cc: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 254bdaeb35f..35142b5341b 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
3842 if (cp->startp == cp->phys.head.lastp || 3842 if (cp->startp == cp->phys.head.lastp ||
3843 sym_evaluate_dp(np, cp, scr_to_cpu(cp->phys.head.lastp), 3843 sym_evaluate_dp(np, cp, scr_to_cpu(cp->phys.head.lastp),
3844 &dp_ofs) < 0) { 3844 &dp_ofs) < 0) {
3845 return cp->data_len; 3845 return cp->data_len - cp->odd_byte_adjustment;
3846 } 3846 }
3847 3847
3848 /* 3848 /*