From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmci: calculate remaining bytes at error correctly
Date: Mon, 31 Jan 2011 14:53:32 +0100 [thread overview]
Message-ID: <AANLkTimTbn-rQik+PvC-GyLd3HBAuGi3f8kR-T2GcvK8@mail.gmail.com> (raw)
In-Reply-To: <20110131104009.GC8948@n2100.arm.linux.org.uk>
On Mon, Jan 31, 2011 at 11:40 AM, Russell King - ARM Linux <
linux@arm.linux.org.uk> wrote:
What can happen is you receive the DATAEND interrupt,
> which tears down the data side of the request, and starts the stop
> command. Meanwhile there's still data left in the FIFO for the CPU
> to read.
>
> I suspect there's a similar race between DMA and the host CPU too as
> you leave the DATAEND interrupt on. I suspect for reliability, we
> need to have the DMA controller callback function in place to enable
> the DATAEND interrupt. Or something like that.
>
Yes I get it now, well, what we do is essentially create three state
variables that are all checked at end of DMA (by adding a
DMA termination callback), end of PIO or DATAEND IRQ arrival.
So a little bit like:
if (dataend && (pio_end || dma_end))
complete;
I'll cook up some patch ASAP, just need to backport some
stuff on top of your latest MMCI patches.
Linus Walleij
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110131/8faa2c07/attachment.html>
next prev parent reply other threads:[~2011-01-31 13:53 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
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 [this message]
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=AANLkTimTbn-rQik+PvC-GyLd3HBAuGi3f8kR-T2GcvK8@mail.gmail.com \
--to=linus.walleij@linaro.org \
--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).