[En-Nut-Discussion] Network Link state on at91_emac and others
Ole Reinhardt
ole.reinhardt at embedded-it.de
Fri Sep 12 14:39:31 CEST 2008
Hi all,
Especialy the at91_emac driver is polling the link state during the
reset sequence and does not continue with the initialisation until a
cable is connected (auto negotiation is complete) or a timeout occurs.
This is done by simply polling the NIC_PHY_BMSR_ANCOMPL bit. If the bit
is not set, the loop will do busy polling for at least a maximum of
1.000.000 times. So if no cable is connected the NutRegisterDevice hangs
for a very very long time.
My questions:
- is it necessary to wait until autonegotiation is complete to do the
nic reset?
- Is there any way to check the current link state? AFAIK right now no
one of the network drivers support checking the link state, right?
- What should correctly happen if a link loss is detected? From my
understanding, this should be communicated up to the socket layer to
abort the currently opened sockets and set the socket error
appropriate, right?
- On the other hand this should perhaps influence the dhcp thread to
request a new ip address after link establishment, right?
- Any further ideas / requirements?
These functions are realy missing in NutOS, so I'd like to start a
discussion how to _correctly_ implement these features.
Regards,
Ole Reinhardt
--
_____________________________________________________________
| |
| Embedded-IT Hard- und Softwarelösungen |
| |
| Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 |
| Luisenstraße 29 Mobil: +49 (0)177 7420433 |
| 57076 Siegen eMail: ole.reinhardt at embedded-it.de |
| Germany Web: http://www.embedded-it.de |
| UstID / VAT: DE198944716 |
|_____________________________________________________________|
More information about the En-Nut-Discussion
mailing list