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: Still on ethernet configuration


On Tue, 2002-10-15 at 22:26, Cristiano Pereira wrote:
> Hi again,
> 
> I debugged through the ioctl function and found out that the code
> is crashing when function i82559_configure returns (at the return 0
> statement, which means it executed successfully) from the call
> executed at the function i82559_start. Any clue why this happens?
> 
> Another thing which a noticed and let me curious is that when I issue
> the command "info threads" on gdb during the debugging I get the
> following answer:
> 
> (gdb) info threads
>   5 thread 4  0xc0052070 in hal_thread_switch_context () at heaps.cxx:19
>   4 thread 3  0xc0052070 in hal_thread_switch_context () at heaps.cxx:19
>   3 thread 2  0xc0052070 in hal_thread_switch_context () at heaps.cxx:19
>   2 thread 1  idle_thread_main (data=1243983)
>     at /opt/ecoscvs/packages/kernel/current/src/common/thread.cxx:1226
> * 1 thread 5  i82559_start (sc=0xc00693fc,
>     enaddr=0x100000 'ÿ' <repeats 200 times>..., flags=16385)
>     at 
> /opt/ecoscvs/packages/devs/eth/intel/i82559/current/src/if_i82559.c:1625
> 
> As far as I understood there are 5 threads running in my system. One
> is the network thread, the other is the net_init thread which I
> created (see the code below) and the third should be the idle thread,
> right? Why are there 5 threads then?
> 

The additional threads are part of the networking stack.

> Here is my whole code (it's quite small but has been giving me big
> headache):

Did you actually compile this code?  It has errors in it that won't
even compile here.

  <snip>
> 
>   build_bootp_record(&bootp_info,
>     "128.195.11.220",
>     "255.255.255.0",
>     "128.195.11.255",
>     "128.195.11.1",
>     "");
> 

This call is incorrect - it needs 7 parameters, like this:
  build_bootp_record(&bootp_info,
                     "eth0",
                     "192.128.1.31",
                     "255.255.255.0",
                     "192.168.1.255",
                     "0.0.0.0",
                     "0.0.0.0"
                     );

Another useful thing to do is print what was created:

  show_bootp("eth0", &bootp_info);

-- 
------------------------------------------------------------
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]