[ECOS] Async Ethernet driver API..

Badri Sampathkumar badri@atheros.com
Tue Mar 22 08:27:00 GMT 2005


I have an working Ethernet driver that uses programmed i/o. I want to change 
it to
use DMA instead of pro i/o.
For the Rx side, the flow of func calls is as below.

eth_drv_dsr()--> deliver()->poll()--> determines if it is a Rx/Tx interrupt.
if Rx, poll()-> Rx-Event()->eth_drv_recv(). eth_drv_recv() allocates the SG 
buffer and calls back into the hw driver hw_recv(). This call into the hw 
driver is a
synchronous call. Once this function returns eth_drv_recv() proceeds with 
further processing of the pkt by passing it up the protocol stack.

If i use DMA, then after setting up the DMA i would return from this 
function (hw_recv).But I dont want the upper layer to contiinue processing 
the pkt since DMA would not have completed yet. Once DMA is complete I want 
to call into the upper layer func to process the pkt.
Is there any way this API can be made Asynchronous..


Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list