Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2005 12:14:19 +0530
From:      rashmi ns <nsrashmi@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   request:help reqd in using bus_dma functions
Message-ID:  <9f9993160509292344l51ee40c3o5baef7b80ce222de@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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, voi=
d
*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,
Member



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f9993160509292344l51ee40c3o5baef7b80ce222de>