From: sshtylyov@mvista•com (Sergei Shtylyov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: mx3: Fix a race condition in mxcmmc
Date: Tue, 27 Apr 2010 14:14:03 +0400 [thread overview]
Message-ID: <4BD6B8EB.8090408@ru.mvista.com> (raw)
In-Reply-To: <20100427075012.GB30801@buzzloop.caiaq.de>
Hello.
Daniel Mack wrote:
> The patch below is a result of more MMC/SDIO tests on MX31 hardware.
>
> From 1b01327ff9c50980c31d7afa3fb6b314eb152fea Mon Sep 17 00:00:00 2001
> From: Volker Ernst <volker.ernst@txtr•com>
> Date: Mon, 26 Apr 2010 22:51:07 +0200
> Subject: [PATCH] ARM: mx3: Fix a race condition in mxcmmc
>
> This fixes a race condition regarding interrupt bits in the SDHC
> controller driver code.
>
> In case of PIO-transfer it does not clear SDHC-status bit#11/12
> in the INT-handler anymore. INT-handler might be called during
> an ongoing PIO-data-transfer (with some other INT-flag set) and
> PIO-transfer depends on these bits being set to detect the end
> of the data-transfer. This also means that at the end of PIO-
> transfer that PIO-software has to clear these bits itself.
>
> However in case of DMA-transfer these bits have to be cleared
> in the INT-handler, because they are used to generate INTs then.
>
> Works solid, no more problems here, can transfer big files.
>
> Signed-off-by: Volker Ernst <volker.ernst@txtr•com>
> Acked-by: Daniel Mack <daniel@caiaq•de>
> Cc: Andy Green <andy@warmcat•com>
> ---
> drivers/mmc/host/mxcmmc.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 2c53024..d625702 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -489,6 +489,8 @@ static void mxcmci_datawork(struct work_struct *work)
> struct mxcmci_host *host = container_of(work, struct mxcmci_host,
> datawork);
> int datastat = mxcmci_transfer_data(host);
> + writel(STATUS_READ_OP_DONE | STATUS_WRITE_OP_DONE, host->base + MMC_REG_STATUS);
Spaces instead of tab here...
WBR, Sergei
next prev parent reply other threads:[~2010-04-27 10:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 7:50 [PATCH] ARM: mx3: Fix a race condition in mxcmmc Daniel Mack
2010-04-27 10:07 ` Paulius Zaleckas
2010-04-27 10:14 ` Sergei Shtylyov [this message]
2010-04-27 10:24 ` Daniel Mack
2010-05-03 11:26 ` Daniel Mack
2010-05-08 10:24 ` Daniel Mack
2010-05-14 10:07 ` Daniel Mack
2010-05-17 9:45 ` Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2010-04-26 20:51 Volker Ernst
2010-04-26 20:51 Volker Ernst
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=4BD6B8EB.8090408@ru.mvista.com \
--to=sshtylyov@mvista$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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