From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3] mmc: mmci: Fixup and cleanup code for DMA handling
Date: Sun, 13 Jan 2013 19:24:29 +0000 [thread overview]
Message-ID: <20130113192428.GU23505@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1357570707-28207-1-git-send-email-ulf.hansson@stericsson.com>
On Mon, Jan 07, 2013 at 03:58:27PM +0100, Ulf Hansson wrote:
> @@ -374,19 +415,12 @@ static void mmci_dma_unmap(struct mmci_host *host, struct mmc_data *data)
> * contiguous buffers. On TX, we'll get a FIFO underrun error.
> */
> if (status & MCI_RXDATAAVLBLMASK) {
> - dmaengine_terminate_all(chan);
> - if (!data->error)
> - data->error = -EIO;
> - }
> -
> - if (data->flags & MMC_DATA_WRITE) {
> - dir = DMA_TO_DEVICE;
> - } else {
> - dir = DMA_FROM_DEVICE;
> + data->error = -EIO;
> + mmci_dma_data_error(host);
Please explain the change of behaviour here. Before your change, we _only_
set data->error if the error is not set. Here, we overwrite the error code
no matter what. What is the reasoning for that change?
The reason the code is like it _was_ is so that any bytes remaining in the
FIFO are _only_ reported as an error if there wasn't a preceding error.
That is the behaviour I desired when I wrote this code.
next prev parent reply other threads:[~2013-01-13 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 14:58 [PATCH V3] mmc: mmci: Fixup and cleanup code for DMA handling Ulf Hansson
2013-01-13 19:24 ` Russell King - ARM Linux [this message]
2013-01-16 10:23 ` Ulf Hansson
2013-01-16 10:49 ` Russell King - ARM Linux
2013-01-16 11:01 ` Ulf Hansson
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=20130113192428.GU23505@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