May 16, 2011
2:17 p.m.
On Mon, May 16, 2011 at 11:25:32AM +0530, Felix Varghese wrote:
On 13 May 2011 20:38, Greg KH <greg@kroah.com> wrote:
Don't statically allocate memory for spi, you need to dynamically allocate it with 'kmalloc'.
The fact that the first time didn't crash for you was just lucky.
I'm guessing you say this because static variables are not in DMA capable memory. But how exactly do we figure out which part of memory is DMA-capable and which isn't?
If you create the memory with a call to kmalloc() it is dma-capable. So always do that.
Also, is this a restriction imposed by the kernel or by the hardware?
The hardware. USB also has this rule. thanks, greg k-h