[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PCI DMA info require
Hi,
> hi all,
> i need some info as to how DMA is used by
> PCI devices ex. an ethernet card, how DMA
> fits in the whole picture.
I think that the DMA is performed by the network card dma
controller (pci dma controller).
In case of RTL network cards:
1. Set the card to be dma bus master
2. we will give first allocate dma-able area using the "pci_alloc_consistent".
3. Inform the network card about this area (feed in the physical addresses to
the network card registers)
4. While reception, the network would automatically perform
DMA from the local buffer (of the network card) to the location which
we had specified in step 1. So we need to only take the packets directly
from that place (no headache of thinking about the DMA, network card will
do it for us.)
(This is similar in case of transmission also)
>also there is a
> field in the net_device struct "dma" which
> holds the "DMA channel allocated by the device",
> what does this mean, is a seperate DMA controller
> used by each PCI device???
Hmm... looks like this member of the structure is not
used in most drivers (8139too.c, ne2k-pci.c etc.)
Hope that helps,
Regards,
KK.
--
HomePage: http://puggy.symonds.net/~krishnakumar
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/