[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Help with dma on PCI driver
On Wed, 30 Mar 2011 07:07:32 -0300
Luis Filipe Rossi <> wrote:

> I am developing a driver for a custom PCI board. I am following the
> example on Essential Linux Device Drivers, but when i am calling the
> pci_alloc_consitent i get the following error:
> Mar 29 15:18:42 luis-desktop kernel: [ 4520.075823] BUG: unable to
> handle kernel NULL pointer dereference at 00000004

Your source was horribly mangled, which is likely to reduce the number of
responses you get. I've not had the time to look at it in great detail,
but I will say that the assumption that the PCI device is already probed
and registered immediately after the pci_register_driver() call is
dangerous at best. Things like dma_descriptor_setup() should be called in
your probe routine (or even later, when you actually need the buffer)
rather than in your module init function.

There's a lot of other issues with this driver, but that's the one I would
look first at for the resolution of this particular crash.


 \ /
  Last update: 2011-03-30 17:25    [W:0.052 / U:1.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site