Skip to content

Commit

Permalink
[SCSI] sym53c8xx: fix resid calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tony Battersby authored and James Bottomley committed Feb 8, 2008
1 parent 51883b5 commit 3dfcb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sym53c8xx_2/sym_hipd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
if (cp->startp == cp->phys.head.lastp ||
sym_evaluate_dp(np, cp, scr_to_cpu(cp->phys.head.lastp),
&dp_ofs) < 0) {
return cp->data_len;
return cp->data_len - cp->odd_byte_adjustment;
}

/*
Expand Down

0 comments on commit 3dfcb70

Please sign in to comment.