[PATCH 00/21] Armada 370/XP NAND support
Daniel Mack
zonque at gmail.com
Thu Sep 19 17:26:01 EDT 2013
On 19.09.2013 23:17, Ezequiel Garcia wrote:
> On Thu, Sep 19, 2013 at 07:47:42PM +0200, Daniel Mack wrote:
>> However, it seems that with CONFIG_HAS_DMA=y, pxa3xx_nand_irq() is now
>> called before pxa3xx_nand_init_buff(), which results in a NULL pointer
>> dereference.
>
> Yup, the problem is very clear: pxa3xx_nand_irq() is now called before
> pxa3xx_nand_init_buff() because there must be a first device detection
> to know which size the page will be. Then pxa3xx_nand_init_buff() is
> called with this detected page size.
>
> See the first patch "Allocate data buffer on detected flash size", which
> removes the need to always allocate a buffer as big as the biggest page,
> and tries to be smarter.
>
> Of course, this doesn't work for DMA transfers. I guess the first device
> detection should be done by PIO always.
Yes, that was my idea as well.
> If you agree with this I'll re-work the patches.
Please do, I'll go test again :)
Daniel
More information about the linux-mtd
mailing list