This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Is it possible to do polling for the Ethernetdriverusing a stack ?


On Mon, 2002-11-04 at 08:41, Cusson, Pascal wrote:
> Hi David,
>    Resulting from your advice and Gary's, my driver works now. However
> instead of calling the eth_int function, I call the eth_deliver function
> which contains a callback to the eth_recv function. I can now ping and
> get a reply. I presume this proves that the stack is working.
> 
>    However, By looking at other drivers, I noticed that the buffers
> never get reset in the code. As if the stack takes care of it. In my
> case, I have to reset the status of each buffer once I detect a new
> packet. In other work, in my eth_recv function, I reset the empty buffer
> bit at the end after the data has been passed the stack buffer. Is this
> a normal behavior ? Shouldn't the stack take care of resetting the empty
> bit as well as the data length ? 
> 

What "empty bit" are you talking about?  If it has *anything* to do
with the actual hardware, then your driver must handle it.  The upper
layers only know about logical things, not physical buffers, etc.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]