This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Is it possible to do polling for the Ethernetdriverusing a stack ?
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: "Cusson, Pascal" <pascal dot cusson at analog dot com>
- Cc: David Webster <dwebster at lanergy dot com>,eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 04 Nov 2002 08:44:48 -0700
- Subject: RE: [ECOS] Is it possible to do polling for the Ethernetdriverusing a stack ?
- References: <8FDC0F9BE1F91D44BE964AA54AAA67B6E7D28B@wilmexm3.ad.analog.com>
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