mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	netdev <netdev@vger.kernel.org>,
	devicetree@vger.kernel.org, "Andrew Lunn" <andrew@lunn.ch>,
	"Alexandre TORGUE" <alexandre.torgue@st.com>,
	"Neil Armstrong" <narmstrong@baylibre.com>,
	"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"kernel list" <linux-kernel@vger.kernel.org>,
	"Julia Lawall" <julia.lawall@lip6.fr>,
	"Andre Roth" <neolynx@gmail.com>,
	linux-amlogic@lists.infradead.org,
	"Carlo Caione" <carlo@caione.org>,
	"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
	"Andreas Färber" <afaerber@suse.de>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net-next v4 0/4] Fix OdroidC2 Gigabit Tx link issue
Date: Fri, 6 Jan 2017 11:58:21 +0000	[thread overview]
Message-ID: <20170106115821.GY14217@n2100.armlinux.org.uk> (raw)
In-Reply-To: <CAGm1_kvZ4dQrJ89qYU5wLGU1NR=j9xyWUm2mgYtq3F1+bo1OCg@mail.gmail.com>

On Fri, Jan 06, 2017 at 06:42:24AM +0100, Yegor Yefremov wrote:
> On Fri, Jan 6, 2017 at 12:25 AM, Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> > Another concern with this patch is that the existing phylib "set_eee"
> > code is horribly buggy - it just translates the modes from userspace
> > into the register value and writes them directly to the register with
> > no validation.  So it's possible to set modes in the register that the
> > hardware doesn't support, and have them advertised to the link partner.
> >
> > I have a patch which fixes that, restricting (as we do elsewhere) the
> > advert according to the EEE supported capabilities retrieved from the
> > PCS - maybe the problem here is that the PCS doesn't support support
> > EEE in 1000baseT mode?
> >
> > Out of interest, which PHY is used on this platform?
> >
> > On the SolidRun boards, they're using AR8035, and have suffered this
> > occasional link drop problem.  What has been found is that it seems to
> > be to do with the timing parameters, and it seemed to only be 1000bT
> > that was affected.  I don't remember off hand exactly which or what
> > the change was they made to stabilise it though, but I can probabily
> > find out tomorrow.
> 
> I have different boards with am335x and AR8035 and we had occasional
> link drop with both 100 and 1000 speeds.

AR8035 has "Smart EEE", which is a PHY specific thing... it's not
entirely 802.3 compliant as it doesn't involve the MAC.

The Smart EEE control registers are in the PCS MMD - some of this
is from people's memories:

- 0x805b is the TX wakeup timer.  Lower 8 bits for 100base-Tx and
  upper 8 bits for 1000base-T.

- 0x805c and 0x805d.
  The LPI timer is 24 bit, with the lower 16 bits in 0x805c and the
  upper 8 in 0x805d.  0x805d bit 8 appears to be the Smart EEE enable bit.

What was found was setting the 1000base-T wakeup timer to the same as
the 100base-Tx avoided the problems we were seeing, which was only
with 1000base-T.  (Whether that's because 100base-Tx hasn't been as well
tested, I don't know.)  SR ended up with 0x1717 in 0x805b.

I'd suggest playing around with that register to see if extending the
wakeup time has any beneficial effect.

Also, I suspect Smart EEE shouldn't be enabled if you have an EEE
capable MAC (in which case 0x805d bit 8 should be clear.)  I think,
however, it defaults to enabled.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2017-01-06 12:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 15:50 Jerome Brunet
2016-11-28 15:50 ` [PATCH net-next v4 1/4] net: phy: add an option to disable EEE advertisement Jerome Brunet
2016-11-28 15:50 ` [PATCH net-next v4 2/4] dt-bindings: net: add EEE capability constants Jerome Brunet
2016-12-05 14:39   ` Rob Herring
2016-12-19 15:16     ` Jerome Brunet
2016-11-28 15:50 ` [PATCH net-next v4 3/4] dt: bindings: add ethernet phy eee-broken-modes option documentation Jerome Brunet
2016-11-28 15:50 ` [PATCH net-next v4 4/4] ARM64: dts: meson: odroidc2: disable advertisement EEE for GbE Jerome Brunet
2016-11-28 17:54 ` [PATCH net-next v4 0/4] Fix OdroidC2 Gigabit Tx link issue Florian Fainelli
2016-11-30  9:47   ` Jerome Brunet
2016-11-30 18:28     ` Florian Fainelli
2017-01-05 23:25   ` Russell King - ARM Linux
2017-01-06  5:42     ` Yegor Yefremov
2017-01-06 11:58       ` Russell King - ARM Linux [this message]
2017-01-06 10:11     ` Jerome Brunet
2017-01-06 11:42       ` Russell King - ARM Linux
2017-01-06 13:50         ` Jerome Brunet
2017-01-06 15:05           ` Russell King - ARM Linux

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=20170106115821.GY14217@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=afaerber@suse.de \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=carlo@caione.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=julia.lawall@lip6.fr \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=neolynx@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=yegorslists@googlemail.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

Powered by JetHome