Hi,
I need help in understanding realtek8139 ethernet chip driver. (it's about basic DMA operation)
in cp_start_xmit which is linked to start_xmit of netdev_ops of teh net_device, I see the driver uses dma_map_single to convert the sk_buf's data address to dma_address_t. (physical address). I understand the sk_buf is coming
from upper protocol layer.
For an address range to be used as DMA address, it should be physical address and non-cacheable.
Also, during the initialization(cp_init_hw function) dma_alloc_cohererent is called to allocate DMA buffer and this address is written in the driver data (ring_dma), and also this DMA buffer address is written to the chip.
Is the data in sk_buf copied to the DMA ring somewhere? if it is, where in the code is it done?
Is it always like this? (using cacheable memory for sk_buf for speed and copy the data to DMA area and let the I/O chip or DMA controller take the data using DMA). I'm just curious if we don't use non-cacheable memory (DMA buffer)
for sk_buf.
Thanks,
Chan Kim
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies