1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-22 10:31:56 +02:00

net: Improve the speed of netconsole

Previously u-boot would initialize the network interface for every
network operation and then shut it down again.  This makes sense for
most operations where the network in not known to be needed soon after
the operation is complete.  In the case of netconsole, it will use the
network for every interaction with the shell or every printf.  This
means that the network is being reinitialized very often.  On many
devices, this intialization is very slow.

This patch checks for consecutive netconsole actions and leaves the
ethernet hardware initialized between them.  It will still behave the
same old way for all other network operations and any time another
network operation happens between netconsole operations.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
Joe Hershberger
2012-08-03 10:59:08 +00:00
parent 2c8fe5120f
commit f8be7d659c
5 changed files with 98 additions and 17 deletions

View File

@@ -121,12 +121,8 @@ static struct {
static unsigned int eth_rcv_current, eth_rcv_last;
#endif
static struct eth_device *eth_devices, *eth_current;
struct eth_device *eth_get_dev(void)
{
return eth_current;
}
static struct eth_device *eth_devices;
struct eth_device *eth_current;
struct eth_device *eth_get_dev_by_name(const char *devname)
{