[U-Boot-Users] Re: Ethernet loopback command
Wolfgang Denk
wd at denx.de
Mon Mar 7 20:30:33 CET 2005
Hello,
in message <D9F0B2AD4531B0449D51C1F09199D484081F14 at mail.kom-saarbruecken.com> you wrote:
>
> The patch attached provides a command called 'ethloop' which allows to
> perform loopback testing on the current eth device. To achieve this, a
Sorry, but I reject this patch. Test functions like this one should
be added as part of the existing POST framework (which probably needs
to be extended for better architecture support; see the archives for
the previous discussions about this).
> new ethernet packet type (PROT_TEST, 0x0808, AFAIK this is not used
> otherwise) is introduced in net/net.c.
> The patch is against SF CVS from 20050307.
I also don't understand why specific ethernet packet types must be
invented. I don't like such non-standard solutions.
> It is necessary to set the ethernet line into loopback mode either by
> programming the PHY or using a loopback plug. I've tested this on our
So you really should add this as part of the POST code where
appropirate provisions can be doen. At first glance your patch looks
like it was universal, which it isn't. Actually I don;t see which
additional information you can get from this test that cannot be
gotten from existing network code like ping.
Also, the code is not completely configurable, and was obviously not
well tested. You add some variables even in case the command is not
cnfigured, which wastes memory and causes compiler warnings.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Not one hundred percent efficient, of course ... but nothing ever is.
-- Kirk, "Metamorphosis", stardate 3219.8
More information about the U-Boot
mailing list