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: possible bug in if_fcc ethernet driver?


In my eCos configuration, I've chosen to initialize
the eth0 interface manually. My initialization routine
(called from within my application routine), tries to
get params via bootp first. If that fails, it then
sets up a bootp record (using data from flash) and
then initializes the network calling the init_net fn.

However, I dont even get to my application's main routine.
The code seems to "hang" in the cyg_net_init function where
the alarm thread and the background network threads are
created.

- Anunoy

--- Gary Thomas <gary@mlbassoc.com> wrote:
> On Mon, 2004-06-14 at 09:15, agyhoo wrote:
> > Hi,
> > 
> > In the if_fcc ethernet driver, the fcc_eth_init routine
> > returns "false" if there is no LINK detected (ie,
> network
> > cable is unplugged). However, there is a compile switch
> > around the return false statement (CYGPKG_REDBOOT).
> > Therefore, when I run my eCos application, it hangs
> when
> > the network cable is unplugged. I think this is because
> the
> > network alarm thread and the background thread think
> the
> > device status is available and try to access it.
> > 
> > Am I missing something? Can someone tell me why the
> compile
> > switch is present?
> 
> We explicitly want RedBoot to not try and use the network
> if there
> is no cable in place (it just wastes time).  In the case
> of eCos,
> I doubt that your program "hangs", but rather it is
> waiting to
> get an ethernet IP address via DHCP (the default
> behaviour).  If
> the network is unplugged, this process will take quite a
> long time
> (more than 30 seconds), waiting for the network to come
> available.
> Eventually, the DHCP will timeout and your code will
> continue,
> but if it needs the network, it will probably have other
> problems.
> 
> -- 
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
> 
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


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