LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@freescale.com>
To: Nate Case <ncase@xes-inc.com>
Cc: linuxppc-dev@ozlabs.org, Kumar Gala <kumar.gala@freescale.com>,
	Andy Fleming <afleming@freescale.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] gianfar: Omit TBI auto-negotiation based on device tree
Date: Thu, 30 Oct 2008 18:07:31 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0810301738020.3943@t2.domain.actdsltmp> (raw)
In-Reply-To: <1225234382-23050-1-git-send-email-ncase@xes-inc.com>

On Tue, 28 Oct 2008, Nate Case wrote:
> Some SGMII PHYs don't auto-negotiate correctly with the TBI+SerDes
> interface on the mpc85xx processors.  Check for the "sgmii-aneg-disable"
> device tree flag and skip enabling auto-negotiation on the TBI
> side if present.  Full duplex 1000 Mbit/s will be assumed for the
> SGMII link to the PHY (note that this does not affect the link speed
> on the external side of the external PHY).

Note that there is a race in the tbi/serdes setup code.  The writes to the
TBI/SerDes with gfar_local_mdio_write() use the same MDIO bus registers as
phylib uses to talk to the real phy or phys.  There is no locking for
gfar_local_mdio vs phylib so they can (and will) clobber each other.

It doesn't usually happen, due to luck and general phylib slowness.  But I've
got some patches in 2.6.28 that speed up phylib and might makes this happen
more often...

But more relevant to your serdes problem, I also have a patch that prevents
restarting serdes auto-negotiation if the serdes link is already up.  My SGMII
PHY will auto-negotiate, but it takes about 3 seconds.  Avoiding an
unnecessary 3 second auto-negotiation when the gianfar device is opened lets
me cut my power-on to DHCP completion time in half.

I wonder if this would also fix your problem, without needing to add the extra
workaround?

  reply	other threads:[~2008-10-31  1:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 22:53 [PATCH] gianfar: Omit TBI auto-negotiation based on device tree Nate Case
2008-10-31  1:07 ` Trent Piepho [this message]
2008-10-31  1:17   ` [PATCH 1/2] gianfar: Fix race in TBI/SerDes configuration Trent Piepho
2008-10-31  5:00     ` Jeff Garzik
2008-10-31  1:17   ` [PATCH 2/2] gianfar: Don't reset TBI<->SerDes link if it's already up Trent Piepho
2008-11-03 18:55   ` [PATCH] gianfar: Omit TBI auto-negotiation based on device tree Nate Case
2008-11-03 20:38     ` Kumar Gala

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=Pine.LNX.4.64.0810301738020.3943@t2.domain.actdsltmp \
    --to=tpiepho@freescale.com \
    --cc=afleming@freescale.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ncase@xes-inc.com \
    --cc=netdev@vger.kernel.org \
    /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