From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] TFTP timeouts, i.mx fec problem?
Date: Fri, 31 May 2013 17:40:41 +0200 [thread overview]
Message-ID: <51A8C479.6010309@denx.de> (raw)
In-Reply-To: <15AE5A936F5E3A42A9144E66875A0A893090ED@server1-derijp.CLB-Benelux.lokaal>
Hi Ruud,
On 31/05/2013 16:36, Ruud Commandeur wrote:
> Dear Wolfgang, Stefano,
>
> I'm pretty sure I found the cause:
>
> For each tftp transfer the ethernet part is re-initialised. This means
> that also fec_init is called. And in fec_init this piece of code
> resides:
>
> #ifndef CONFIG_PHYLIB
> if (fec->xcv_type != SEVENWIRE)
> miiphy_restart_aneg(dev);
> #endif
>
Indeed, this is wanted. As design, U-Boot should not touch any interface
that is not needed and must close/reset the interface after usage. The
main reason is that the kernel is expecting a fresh powered on system,
and we get a lot of cases (USB, for instance) when the kernel cannot go
on because the bootloader let the controller in an unknown status.
> This means (in this case) that miiphy_restart_aneg() is called. And here
> the phy gets a software reset and autonegotiation restart command, wich
> can take up to 500 msces according to the datasheet. So when we would
> like to send out the 1st ARP request, the phy is busy with restart and
> negotiation. If I skip these commands, any tftp transfer is fast as
> lightning! About 150 msecs between pressing enter and the completion of
> a small file (68 bytes).
>
> Of course, re-initialisation of all parts for each transfer sounds like
> the safest solution.
We discussed this issue many times, yes.
> But perhaps the phy could only be reset /
> initialised once after start-up. Would this be an option?
I know that there is an exception using netconsole - if the FEC driver
stops after each packet, it could not work. But again, letting the
controller in a well known status should be a must before booting the
kernel. In current code, eth_halt() is called before booting linux only
if NETCONSOLE is activated (common/cmd_bootm.c).
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2013-05-31 15:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 6:56 [U-Boot] TFTP timeouts, i.mx fec problem? Ruud Commandeur
2013-05-31 7:56 ` Wolfgang Denk
2013-05-31 8:50 ` Stefano Babic
2013-05-31 10:16 ` Ruud Commandeur
2013-05-31 12:54 ` Ruud Commandeur
2013-05-31 14:19 ` Wolfgang Denk
2013-05-31 14:36 ` Ruud Commandeur
2013-05-31 15:40 ` Stefano Babic [this message]
2013-05-31 18:56 ` Wolfgang Denk
2013-05-31 15:46 ` Stefano Babic
2013-05-31 16:00 ` Fabio Estevam
2013-05-31 18:58 ` Wolfgang Denk
2013-05-31 19:09 ` Troy Kisky
2013-06-01 9:18 ` Ruud Commandeur
2013-06-07 0:15 ` Fabio Estevam
2013-06-07 1:25 ` Marek Vasut
2013-06-07 1:34 ` Fabio Estevam
2013-06-07 1:50 ` Marek Vasut
2013-06-07 9:28 ` Ruud Commandeur
2013-06-07 9:39 ` Eric Bénard
2013-06-14 13:01 ` Ruud Commandeur
2013-06-14 15:30 ` Wolfgang Denk
2013-06-17 6:51 ` Ruud Commandeur
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=51A8C479.6010309@denx.de \
--to=sbabic@denx.de \
--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