Re: : dma operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 6/21/07, Dinesh <dbhat@xxxxxxxxx> wrote:
It really depends on the way the firmware responds. We use an interrupt
to indicate the end of DMA.

/* Flag end-of-chain */
                        if (status & LSDMA_CH_CSR_INTSRCDONE) {
                                set_bit (0, &iface->dma_done);
                        }


In the above part of the code (this code belongs to ISR), we set
LSDMA_CH_CSR_INTSRCDONE to indicate the end of chain in a scatter/gather
DMA operation. We also use another bit called LSDMA_CH_CSR_INTSRCSTOP to
abort the dma. So, these two are from the DMA implementation on the
firmware. But, the checking must be done in ISR.

Dinesh

Thanks for it. So does that mean that the call to dma_unmap_* isnt very reliable as a method to signal a finished dma transfer. I wanted to see how many dma transfers are done and so i thought of logging the calls to the unmap functions because that seemed to be one reasonably accurate way of telling that a dma transfer has finished and it saved me from reading and editing the driver code itself. I know that the ISR is probably the best place to do my job but that would mean editing it for all the drivers which i dont want to do.
Also can you enlighten me a bit more about the coherent mappings. I dont understand how does the driver inform the device when to actually start talking the data and also the direction of data transfer. Is it done by setting up some device speicific registers every now and then?

regards
devvrat


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux