From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmci: calculate remaining bytes at error correctly
Date: Thu, 27 Jan 2011 16:36:43 +0000 [thread overview]
Message-ID: <20110127163643.GG25968@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1296137666-30906-1-git-send-email-linus.walleij@stericsson.com>
On Thu, Jan 27, 2011 at 03:14:26PM +0100, Linus Walleij wrote:
> The MMCIDATACNT register contain the number of byte left at error
> not the number of words, so loose the << 2 thing. Further if CRC
> fails on the first block, we may end up with a negative number
> of transferred bytes which is not good, and the formula was in
> wrong order.
Hmm.
In order to have a CRC error, you must have transferred one block through
the FIFO. We might read the data counter before one block has been fully
transferred.
So, maybe we want:
host->data_xfered = ((success - 1) / data->blksz) * data->blksz;
instead?
next prev parent reply other threads:[~2011-01-27 16:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 14:14 [PATCH] mmci: calculate remaining bytes at error correctly Linus Walleij
2011-01-27 16:36 ` Russell King - ARM Linux [this message]
2011-01-27 16:43 ` Linus Walleij
2011-01-27 16:47 ` Russell King - ARM Linux
2011-01-30 21:28 ` Russell King - ARM Linux
2011-01-30 21:29 ` Russell King - ARM Linux
2011-01-31 10:24 ` Linus Walleij
2011-02-03 0:30 ` Russell King - ARM Linux
2011-02-03 14:00 ` Russell King - ARM Linux
2011-02-04 13:24 ` Linus Walleij
2011-01-31 10:17 ` Linus Walleij
2011-01-31 10:27 ` Russell King - ARM Linux
2011-01-31 10:31 ` Linus Walleij
2011-01-31 10:40 ` Russell King - ARM Linux
2011-01-31 13:53 ` Linus Walleij
2011-01-31 14:00 ` Russell King - ARM Linux
2011-01-31 12:00 ` Sergei Shtylyov
2011-01-31 12:25 ` Russell King - ARM Linux
2011-01-31 12:31 ` Sergei Shtylyov
2011-02-01 23:40 ` Russell King - ARM Linux
-- strict thread matches above, loose matches on Subject: below --
2011-01-27 14:02 Linus Walleij
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=20110127163643.GG25968@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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 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).