[U-Boot] NetConsole and network API

Stefano Babic sbabic at denx.de
Fri Aug 13 15:52:19 CEST 2010


Hi all,

I have seen an issue using netconsole and I am asking myself if there is
a problem in the actual concept of a network interface in u-boot.

I admit soon I have not used a "normal" network controller, but I ran
NetConsole on Ethernet over USB. However, I have checked with other
network drivers  (smc9111.c, for example) and I can imagine there are
similar problems.

The assumption we have is that any network command is atomic.
Any network command initializes the interface, uses it (eth_send(), ..)
and at the end deactivates the interface (eth_halt()). This makes an
application as netconsole simply unusable, because it is not thinkable
that after any message the interface is put in a down state. Not only,
it makes impossible to use network commands as TFTP inside netconsole,
because they try to initialize the same interface that netconsole uses.

Of course, in my case things get even worse. After any network command,
the eth_halt() callback is called, making the interface disappearing on
the host side. And any time the host starts to enumerate again the
interface, setting MAC, etc.....

Well, I have fixed this issue avoiding the interface is initialized or
stopped after each command, but it seems this is a general problem. I
see in other drivers that the phy is set or stop after each command, and
this should generate the same problems I noted with USB.

My main question to the ML is, independently from the particular problem
on my target, if we should change the actual concept. For example, if we
provide to stop all devices only before booting an OS, but leaving them
alive after the first initialization. I understand that this generate
other issues (as u-boot cannot recognize that a cable was removed and
inserted again), but it makes the system usable in other circumstances.

Any thought about this ?

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list