[U-Boot] [PATCH 3/3] net/tsec: Don't tell the link status if used with netconsole

Joe Hershberger joe.hershberger at gmail.com
Mon Apr 9 23:43:30 CEST 2012


On Sun, Apr 8, 2012 at 3:26 AM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Wednesday 04 April 2012 11:27:44 Joe Hershberger wrote:
>> On Tue, Apr 3, 2012 at 3:54 PM, Sebastian Andrzej Siewior wrote:
>> > On 04/03/2012 10:42 PM, Mike Frysinger wrote:
>> >> On Friday 23 March 2012 16:11:19 Sebastian Andrzej Siewior wrote:
>> >>> --- a/drivers/net/tsec.c
>> >>> +++ b/drivers/net/tsec.c
>> >>>
>> >>> +       if (strcmp(getenv("stdout"), "nc"))
>> >>
>> >> i really don't like special casing devices like this
>>
>> In this case I think it is better to check if stdout is nc, but not to
>> explicitly write to serial_printf().  The nc device is the reason to
>> avoid printing this since it uses the network.  The serial_printf
>> seems like the special case to avoid.  Consider the case of using a
>> SPI UART.  There is no reason these traces should not go to it via the
>> normal printf routing.
>
> my point is that this doesn't scale ... not even close.  either drop the
> printf calls in the core net case (when it'd be a problem with the
> netconsole), or figure out a solution that does actually scale.  maybe a
> net_printf().

I agree.  A net_printf sounds like a good solution.

-Joe


More information about the U-Boot mailing list