From: Tony Battersby <tonyb@cybernetics.com>
To: Matthew Wilcox <matthew@wil.cx>, linux-scsi@vger.kernel.org
Subject: [PATCH] [SCSI] sym53c8xx: fix resid calculation
Date: Tue, 06 Nov 2007 16:07:04 -0500 [thread overview]
Message-ID: <4730D778.9040807@cybernetics.com> (raw)
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;
}
/*
reply other threads:[~2007-11-06 21:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4730D778.9040807@cybernetics.com \
--to=tonyb@cybernetics.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.