From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tsec: Wait for auto-negotiation to complete without link
Date: Fri, 06 Feb 2009 09:16:32 -0800 [thread overview]
Message-ID: <498C7070.70301@gmail.com> (raw)
In-Reply-To: <498C3830.6010407@ge.com>
Jerry Van Baren wrote:
> Wolfgang Denk wrote:
>
>> Dear Scott Wood,
>>
>> In message <498A0D5C.5060901@freescale.com> you wrote:
>>
>>> Andy Fleming wrote:
>>>
>>>> Hmmm....I made that change for a reason. Waiting for autonegotiation
>>>> to finish on a tsec with no link was quite tiresome. If you've hooked
>>>> up the 4th tsec, and try to boot, you end up waiting for *three* tsecs
>>>> to timeout. If dhcp fails because the link isn't up you can always
>>>> try again, or add a delay before dhcp starts so that the link is up.
>>>>
>>>> I'm open to other suggestions, but I really don't want to go back to
>>>> the old behavior.
>>>>
>>> Is there any way that you could do the auto-negotiation in parallel?
>>>
>
> Excellent suggestion!
>
> Related suggestion: if we knew that the PHY was strapped to start
> autonegotiation on power up (it is a board-specific option, typically
> true), we could enhance the code to use those autonegotiation results
> rather than hitting the PHY with the reset hammer and restarting
> autonegotiation. This would have an added advantage of "reducing"
> network start up time by 2 seconds (assuming normal power up time is
> more than 2 seconds) by overlapping the software initialization and PHY
> autonegotiation.
>
>
I think this is a good idea. Serial autonegotiation is really such a
time killer and has little to do with software, why not at least do a
best effort attempt at letting all PHYs (or as many as the board
developer feels like) autonegotiate as early in the process as possible?
>> You definitely do not want to do that.
>>
>> Requirement is NOT to initialize network interfaces unless used by
>> U-Boot.
>>
>
> Autonegotiation is *not necessarily* a violation of this principle. The
> autonegotiation is in the PHY and is (should be) logically completely
> separate from initializing the network interface (MAC).
>
> Just because the PHY is ready to run should have no impact on u-boot or
> linux start up. Case in point: most PHYs actually start their
> autonegotiation when power is applied (it typically is a strapping option).
>
> Caveats:
> * I have not looked at the code, but the PHY initialization is probably
> coupled in s/w with the MAC (ethernet chip) initialization. This would
> have to be changed to decouple the two.
>
Currently, it depends greatly on the interface since each does its own
thing. I have some PHY-related development ongoing (phylib branch of
the net tree) that leverages heavily from the Linux PHY drivers and some
existing U-boot drivers that will let the user specify all sorts of
things in board code. I'd hoped to get it into the current release but
that date's creeping up and I'm low on time. I hope to start RFCing it
soon so in the following release we can migrate as many ethernet drivers
as possible. Anyway, with it we should be able to at least start AN via
software in parallel, if desired of course.
> * Typically, PHYs have an interrupt output line. I'm assuming here that
> the interrupt is disabled. If the interrupt is *enabled,* it *would*
> violate u-boot's ground rule about not leaving hardware grenades laying
> around. The interrupt can be disabled in the PHY itself or at the CPU
> end of the interrupt line.
> 1) It would be very unusual to have the interrupt enabled in u-boot.
> I would be surprised if any PHY initialization enables the
> interrupt (it is a control bit in a register in the PHY,
> I forgot if it is a standard register or PHY-specific).
> 2) If a PHY interrupt causes a problem in linux, it is a driver bug
> IMHO because it would mean the linux driver enabled the interrupt
> before initializing the handler. This would be a race condition
> bug regardless of what u-boot does with the PHY and I trust none
> of these are present in linux. ;-/
>
>
>> Best regards,
>>
>> Wolfgang Denk
>>
>
> Ditto,
> gvb
>
> _________
Good discussion.
cheers,
Ben
next prev parent reply other threads:[~2009-02-06 17:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 21:14 [U-Boot] [PATCH] tsec: Wait for auto-negotiation to complete without link Peter Tyser
2009-02-04 21:20 ` Andy Fleming
2009-02-04 21:26 ` Wolfgang Denk
2009-02-04 21:45 ` Peter Tyser
2009-02-04 23:07 ` Andy Fleming
2009-02-05 16:27 ` Peter Tyser
2009-02-06 13:32 ` Jerry Van Baren
2009-02-06 18:49 ` Andy Fleming
2009-02-06 19:30 ` Jerry Van Baren
2009-02-10 0:56 ` Andy Fleming
2009-02-10 13:59 ` Jerry Van Baren
2009-02-10 17:31 ` Scott Wood
2009-02-25 20:30 ` Peter Tyser
2009-02-04 21:49 ` Scott Wood
2009-02-04 21:58 ` Wolfgang Denk
2009-02-04 22:00 ` Scott Wood
2009-02-04 22:19 ` Wolfgang Denk
2009-02-06 13:16 ` Jerry Van Baren
2009-02-06 17:16 ` Ben Warren [this message]
2009-07-19 20:14 ` Peter Tyser
2009-08-04 22:50 ` Peter Tyser
2009-08-21 17:04 ` Peter Tyser
2009-08-21 17:35 ` Ben Warren
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=498C7070.70301@gmail.com \
--to=biggerbadderben@gmail.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