* [PATCH] [SCSI] sym53c8xx: fix resid calculation
@ 2007-11-06 21:07 Tony Battersby
0 siblings, 0 replies; only message in thread
From: Tony Battersby @ 2007-11-06 21:07 UTC (permalink / raw)
To: Matthew Wilcox, linux-scsi
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>
---
--- linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_hipd.c.orig 2007-11-06 15:51:12.000000000 -0500
+++ linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_hipd.c 2007-11-06 15:51:44.000000000 -0500
@@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb
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;
}
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-06 21:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 21:07 [PATCH] [SCSI] sym53c8xx: fix resid calculation Tony Battersby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).