request:help reqd in using bus_dma functions
rashmi ns
nsrashmi at gmail.com
Thu Sep 29 23:42:31 PDT 2005
hello group ,
I am writing a network driver where in have created tags and maps for
tx_desc of transmit-q-size by using these functions .
1. bus_dma_tag_create
2. bus_dmamap_create
3.bus_dmamem_alloc
struct xxxx_tx_desc {
DWORD data_buff;
DWORD cvbcnxt;
DWORD channel_no;
DWORD pend_desc;
};
For a packet to be transmitted a packet's address should be placed in
tx_desc_q 's DWORD data_buff field and update the rest of the fields .Then
h/w detects the presence of the packet and tranmits the packet
now to test I want to load a buffer like (char buff[50])in tx_q space can
any one tell me in which order I can use bus_dma functions .I have gone th'
docs but not very sure as I'm writing n/w drivers for the first time .I'm
not clear with the dma concepts . I'm getting confused kindly help
Now should I use bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void
*buf, bus_size_t buflen, bus_dmamap_callback_t *callback,void *callback_arg,
int flags);
I'm not getting what callback func should to how to get the mapped address
and place into tx_desc_q 's
Thanks and regards,
Rashmi
More information about the freebsd-drivers
mailing list