From: arno@natisbad.org (Arnaud Ebalard)
To: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Cc: dwmw2@infradead.org, kyungmin.park@samsung.com,
linux-mtd@lists.infradead.org,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: Re: [PATCH] mtd: OneNAND: OMAP3: unmap correct DMA buffer
Date: Tue, 06 Apr 2010 09:58:57 +0200 [thread overview]
Message-ID: <874ojpdnb2.fsf@small.ssi.corp> (raw)
In-Reply-To: 1269351224-10637-1-git-send-email-ext-mika.1.westerberg@nokia.com
Hi,
Mika Westerberg <ext-mika.1.westerberg@nokia.com> writes:
> Function omap3_onenand_write_bufferram() maps the write buffer and stores the
> returned handle in dma_src. However, when it does the DMA unmap, it uses wrong
> DMA handle (dma_dst).
>
> This patch fixes it to use the correct DMA handle.
>
> Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
> ---
> drivers/mtd/onenand/omap2.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index 75f38b9..2d81a3a 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -402,7 +402,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
>
> dma_src = dma_map_single(&c->pdev->dev, buf, count, DMA_TO_DEVICE);
> dma_dst = c->phys_base + bram_offset;
> - if (dma_mapping_error(&c->pdev->dev, dma_dst)) {
> + if (dma_mapping_error(&c->pdev->dev, dma_src)) {
> dev_err(&c->pdev->dev,
> "Couldn't DMA map a %d byte buffer\n",
> count);
> @@ -425,7 +425,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
> if (*done)
> break;
>
> - dma_unmap_single(&c->pdev->dev, dma_dst, count, DMA_TO_DEVICE);
> + dma_unmap_single(&c->pdev->dev, dma_src, count, DMA_TO_DEVICE);
>
> if (!*done) {
> dev_err(&c->pdev->dev, "timeout waiting for DMA\n");
That patch removes the kernel panic I get when booting current l-o
kernel on my N900.
Tested-by: Arnaud Ebalard <arno@natisbad.org>
Cheers,
a+
next prev parent reply other threads:[~2010-04-06 7:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 13:33 [PATCH] mtd: OneNAND: OMAP3: unmap correct DMA buffer Mika Westerberg
2010-03-23 13:41 ` Adrian Hunter
2010-03-24 10:10 ` [PATCH v2] mtd: OneNAND: OMAP2/3: " Mika Westerberg
2010-04-06 7:58 ` Arnaud Ebalard [this message]
2010-04-06 8:55 ` [PATCH] mtd: OneNAND: OMAP3: " Adrian Hunter
2010-04-08 8:25 ` Artem Bityutskiy
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=874ojpdnb2.fsf@small.ssi.corp \
--to=arno@natisbad.org \
--cc=adrian.hunter@nokia.com \
--cc=dwmw2@infradead.org \
--cc=ext-mika.1.westerberg@nokia.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mtd@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).