mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Eric Bénard" <eric@eukrea.com>
Cc: barebox@lists.infradead.org
Subject: Re: Porting barebox to Novena: misc questions
Date: Thu, 13 Mar 2014 22:26:24 +0100	[thread overview]
Message-ID: <20140313212623.GV17250@pengutronix.de> (raw)
In-Reply-To: <20140313214307.54dbdad8@e6520eb>

On Thu, Mar 13, 2014 at 09:43:07PM +0100, Eric Bénard wrote:
> Hi,
> 
> Le Thu, 13 Mar 2014 10:04:35 +0800,
> Sean Cross <xobs@kosagi.com> a écrit :
> > I've finally managed to get U-Boot's SPL to configure DDR3 and load
> > barebox off of a FAT partition on an i.MX6DL.  I also have a barebox
> > build with most features turned on, and I'm running into a number of
> > problems.  barebox is able to load a zImage off of the FAT partition,
> > set up ATAGs, and jump to it.  So I have the basics done.  But there are
> > lots of little things that aren't working.
> > 
> > When I boot without an Ethernet cable plugged in, the "timeout" command
> > takes a very long time to complete.  It generally freezes at "Hit any
> > key to stop autoboot:  3" and tends to ignore input for around ten
> > seconds.  How can I prevent this from happening, short of compiling out
> > FEC support?
> > 
> that's very similar to what I reported here :
> http://lists.infradead.org/pipermail/barebox/2014-February/018005.html
> 
> I didn't yet had time to investigate more based on Sascha's answer but
> that's on my todo list.

Ok, got it. The following fixes this. Looking at the netconsole it seems
some love is needed. Right now it only seems to work when port and ip
are set in the right order.

Sascha

--------------8<----------------------------------

From e4616cba4ec41ebc0d9e0419fd094984209ddbd1 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Thu, 13 Mar 2014 22:09:47 +0100
Subject: [PATCH] netconsole: bail out when no connection is opened

When no connection is opened we should not call into
the networking stack. Otherwise it can happen that we
delay further execution until the network stack detected
a link (or timed out bringing the link up).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 net/netconsole.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/netconsole.c b/net/netconsole.c
index 2ab19de..86a68e1 100644
--- a/net/netconsole.c
+++ b/net/netconsole.c
@@ -81,6 +81,9 @@ static int nc_getc(struct console_device *cdev)
 					struct nc_priv, cdev);
 	unsigned char c;
 
+	if (!priv->con)
+		return 0;
+
 	while (!kfifo_len(priv->fifo))
 		net_poll();
 
@@ -94,6 +97,9 @@ static int nc_tstc(struct console_device *cdev)
 	struct nc_priv *priv = container_of(cdev,
 					struct nc_priv, cdev);
 
+	if (!priv->con)
+		return 0;
+
 	if (priv->busy)
 		return kfifo_len(priv->fifo) ? 1 : 0;
 
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-03-13 21:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  2:04 Sean Cross
2014-03-13  7:38 ` Sascha Hauer
2014-03-13 10:18   ` Sean Cross
2014-03-13 20:27     ` Sascha Hauer
2014-03-14  3:35       ` Sean Cross
2014-03-14  8:22         ` Sascha Hauer
2014-03-17  4:28           ` Sean Cross
2014-03-17  7:18             ` Sascha Hauer
2014-03-17  7:31               ` Alexander Aring
2014-03-17  7:44               ` Sean Cross
2014-03-17 10:53                 ` Sascha Hauer
2014-03-18  3:35                   ` Sean Cross
2014-03-18  8:36                     ` Sascha Hauer
2014-03-18  8:43                       ` Sean Cross
2014-03-18  8:58                         ` Sascha Hauer
2014-03-18  9:04                           ` Sean Cross
2014-03-13 19:42   ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-13 20:30     ` Sascha Hauer
2014-03-14  3:03       ` Jean-Christophe PLAGNIOL-VILLARD
2014-03-13 20:43 ` Eric Bénard
2014-03-13 21:26   ` Sascha Hauer [this message]
2014-03-14  3:13     ` Jean-Christophe PLAGNIOL-VILLARD

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=20140313212623.GV17250@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eric@eukrea.com \
    /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