Dear all,
I am developing a pci driver for a specific
card.
It uses dma transfer and my problem is
the
dma transfer goes well once insmod the
module.
If unload(rmmod) and load(load) again,
dma
transferring does not occur. Simply the
dma
interrupt does not occur.
what i hv done is as follows.
When initializing
1. kmalloc for
dma_buffer(64k)
2. clear and mask the
interrupt
in write function
1. copy data to
dma_buffer
2. bus_addr =
dma_map_single()
3. set address, size, etc. in
pci registers
4. clear and unmask the
interrupt
4. start the dma
transfer
in the interrupt routine
1. clear the
interrupt
2. dma_unmap_single()
dma transfer goes well as long as first loading is
there.
But in the second insmod dma fails.(interrupt
fails).
Even if no dma transfer done in first insmod, dma
transfer
fails in second loading .
If I restart my machine, then everything works
again in
the first attempt.
My guess is a hardware problem.
can it be a problem of the driver or anything to do
with
the kernel??
There is no register to reset dma.(no idea whether
it is
necessary).
Thanks in advance.
Sumudu
|