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.