[PATCH] mtd: nand: pxa3xx: Use info->use_dma to release DMA resources

Brian Norris computersforpeace at gmail.com
Mon Dec 9 18:10:28 EST 2013


On Mon, Dec 09, 2013 at 07:32:59PM -0300, Ezequiel Garcia wrote:
> > On Wed, Nov 27, 2013 at 08:34:06AM -0300, Ezequiel Garcia wrote:
> > > On Tue, Nov 26, 2013 at 11:58:19PM -0800, Brian Norris wrote:
> > >
> > > It's a very rare condition, but it's a real bug. Is that enough for -stable?
> > 
> > Yes, this qualifies just fine. I'm not quite sure how far back this can
> > go on stable, though, as we have a lot of churn in pxa3xx_nand.c.
> > It looks like the bug is long-standing, but we may need to port it for
> > older releases. Let me know what you want to do here.
> > 
> 
> No, it's not. This was actually introduced by me when we added the
> non-DMA initial probing to allocate a buffer based on the page size.
> 
> Namely, I *think* this commit introduces the bug (haven't actually
> tested it):
> 
> commit 62e8b851783138a11da63285be0fbf69530ff73d
> Author: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
> Date:   Fri Oct 4 15:30:38 2013 -0300
> 
>   mtd: nand: pxa3xx: Allocate data buffer on detected flash size
> 
> This commit changed the way we allocate the buffer: the first READ_ID
> is issued with a small kmalloc'ed buffer and only later DMA buffer are
> allocated.

Yes, that commit makes sense as the introduction of the bug. So no need
for -stable, then.

> So the actual decision must now be made based on 'info->use_dma' instead
> of module parameter 'use_dma' (this also uncovers a real crappy naming issue
> in this driver, which I should have changed long long ago).
> 
> Therefore, this doesn't hit stable, and it's just v3.13 material; sorry
> for the confusion. And to be fair, the commit log could much better.
> Right now it looks a bit laconic. Want me to resend a more verbose one?

Yes, please.

Brian



More information about the linux-mtd mailing list