public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Brian Prodoehl <bjprodoehl@uwalumni.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] NetConsole tstc problems
Date: Wed,  2 Nov 2005 11:34:47 -0600	[thread overview]
Message-ID: <20051102113447.bc4sw4gsoockkk40@secure.uwalumni.com> (raw)
In-Reply-To: <20051102075928.99DEB35265C@atlas.denx.de>

> In message <20051101151924.c9ww4408kw8ososc@secure.uwalumni.com> you wrote:
> > Has anyone else experienced problems with NetConsole's tstc?  In
> particular,
> > defining CONFIG_BOOT_RETRY_TIME makes NetConsole almost unusable for me,
> > because then readline() in main.c blocks on tstc and the result (for me, at
> > least) is that NetConsole accepts a character every second or so.  For
> > everything that doesn't depend on tstc, NetConsole works beautifully for
> me.
> > I'm just wondering if anyone else has seen problems, or if anyone has
> > suggestions on how to make tstc less of a show-stopper (something I haven't
> > been able to accomplish).
>
> Please use current code. A fix inthis area  has  been  checked  in  a
> couple of days ago.

I'm not sure which fix you mean.  The fix to the sleep command corrected the
time issue, but there are still underlying problems with nc_tstc.  Try hitting
Ctrl+C to abort the sleep.  I have to hit it between 3 and 10 times before it
registers.  And that fix doesn't help at all with the CONFIG_BOOT_RETRY_TIME
problem.  I don't see any configs using NetConsole and bootretry, but I'd be
interested to hear that someone has it working without having to change core
code.  My current fix is to change the following in main.c's readline():

	for (;;) {
- #ifdef CONFIG_BOOT_RETRY_TIME
+ #if defined(CONFIG_BOOT_RETRY_TIME) && !defined(CONFIG_NETCONSOLE)
		while (!tstc()) {	/* while no incoming data */
			if (retry_time >= 0 && get_ticks() > endtime)
				return (-2);	/* timed out */
		}
#endif
		WATCHDOG_RESET();	/* Trigger watchdog, if needed */

With that change, I'm at least able to use NetConsole when
CONFIG_BOOT_RETRY_TIME is defined, but only by skirting around a tstc that
doesn't work very well.

Brian Prodoehl

  reply	other threads:[~2005-11-02 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 21:19 [U-Boot-Users] NetConsole tstc problems Brian Prodoehl
2005-11-02  7:51 ` Stefan Roese
2005-11-02  7:59 ` Wolfgang Denk
2005-11-02 17:34   ` Brian Prodoehl [this message]
2005-11-02 18:10     ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051102113447.bc4sw4gsoockkk40@secure.uwalumni.com \
    --to=bjprodoehl@uwalumni.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox