From: Ulf Hansson <ulf.hansson@linaro.org>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Fabio Estevam <festevam@gmail.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Doug Anderson <dianders@chromium.org>,
Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH 1/2] mmc: mxcmmc: really configure the DMA on demand
Date: Wed, 11 Aug 2021 13:36:10 +0200 [thread overview]
Message-ID: <CAPDyKFrkDb0X24F4cTopOF24sKWv4oxYqxv6U3jKbnRLMEF_Qw@mail.gmail.com> (raw)
In-Reply-To: <20210729072929.10267-2-jbe@pengutronix.de>
On Thu, 29 Jul 2021 at 09:29, Juergen Borleis <jbe@pengutronix.de> wrote:
>
> Calling mxcmci_use_dma(host) is intended for the next transfer only, not
> for generic detection if DMA is possible. Without this change, the DMA gets
> never configured and thus, never used.
Wow, that's an old bug you found there.
>
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
It looks like we should add a fixes tag and add a stable tag:
Fixes: f53fbde48ef0 ("mmc: mxcmmc: use dmaengine API")
> ---
> drivers/mmc/host/mxcmmc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 2fe6fcd..611f827 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -834,7 +834,8 @@ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> else
> burstlen = 4;
>
> - if (mxcmci_use_dma(host) && burstlen != host->burstlen) {
> + if (host->dma != NULL && burstlen != host->burstlen) {
> + /* reconfigure DMA on changes only */
> host->burstlen = burstlen;
> ret = mxcmci_setup_dma(mmc);
> if (ret) {
A few lines below here, you should not clear host->do_dma, as it can't
be set at this point (thus clearing it just adds confusion).
Also I wonder if patch2 is really needed to fix the bug, or should be
considered as nice cleanup instead?
Kind regards
Uffe
next prev parent reply other threads:[~2021-08-11 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 7:29 Make the i.MX MMC device using DMA again Juergen Borleis
2021-07-29 7:29 ` [PATCH 1/2] mmc: mxcmmc: really configure the DMA on demand Juergen Borleis
2021-08-11 11:36 ` Ulf Hansson [this message]
2021-07-29 7:29 ` [PATCH 2/2] mmc: mxcmmc: don't expect a DMA operation if DMA seems present Juergen Borleis
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=CAPDyKFrkDb0X24F4cTopOF24sKWv4oxYqxv6U3jKbnRLMEF_Qw@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=dianders@chromium.org \
--cc=festevam@gmail.com \
--cc=jbe@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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).