From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Alexandre TORGUE" <alexandre.torgue@st.com>,
"Neil Armstrong" <narmstrong@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Yegor Yefremov" <yegorslists@googlemail.com>,
"Julia Lawall" <julia.lawall@lip6.fr>,
devicetree@vger.kernel.org, "Andre Roth" <neolynx@gmail.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Carlo Caione" <carlo@caione.org>,
"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
linux-amlogic@lists.infradead.org,
"Andreas Färber" <afaerber@suse.de>,
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 15:05:35 +0000 [thread overview]
Message-ID: <20170106150534.GF14217@n2100.armlinux.org.uk> (raw)
In-Reply-To: <1483710621.28003.74.camel@baylibre.com>
(quick reply...)
On Fri, Jan 06, 2017 at 02:50:21PM +0100, Jerome Brunet wrote:
> So I'm not sure I understand, are you against EEE integration in phylib
> entirely, or specifically against the test I added in set_eee to filter
> out broken modes ?
I'm happy to see EEE integrated into phylib, but I think the current
implementation is very buggy and needs a rewrite.
> > BTW, one of the problems (not caused by your patch) is that changing
> > the EEE advertisment does not (on all PHY drivers) cause the link to
> > be renegotiated - there's no call to phy_start_aneg() when the advert
> > changes, and even if there was, there's no guarantee that
> > phy_start_aneg() will even set the AN restart bit in the control
> > register.
> >
> > However, given that you're hooking into the set_eee function, I'm not
> > sure why you placed your EEE advertisment thing into config_aneg() -
> > isn't it more an initialisation thing (so should be in
> > config_init()?)
>
> What I change is what the PHY advertise, so it seems logical to do it
> where "genphy_config_advert" was called. Just taking the existing code
> as an example
You need to adjust the adverisment in two places:
1. On initialisation, when you need to change the default value.
2. Whenever the user requests a different EEE advertisment.
You don't need to do it each time config_aneg() is called - nothing's
going to change the EEE advertisment in that path. Hence, to check
it each and every time seems like a waste of CPU cycles.
However, there's another path that needs to be considered, which the
current EEE code fails to do, and that is the resume path. Nothing
at present saves and restores the EEE settings, they are completely
lost if the PHY is powered down. This is just another symptom of the
current poor quality EEE implementation in phylib, and another reason
why I say above that the EEE code is in need of a rewrite... which is
something I will be looking at.
If the EEE settings are properly saved and restored over suspend/
resume, then the previously programmed EEE advertisment would also
be restored.
--
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.
prev parent reply other threads:[~2017-01-06 15:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 15:50 [PATCH net-next v4 0/4] Fix OdroidC2 Gigabit Tx link issue 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
[not found] ` <1480348229-25672-1-git-send-email-jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
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 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
[not found] ` <1480499246.17538.208.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-11-30 18:28 ` Florian Fainelli
2017-01-05 23:25 ` Russell King - ARM Linux
2017-01-06 5:42 ` Yegor Yefremov
[not found] ` <CAGm1_kvZ4dQrJ89qYU5wLGU1NR=j9xyWUm2mgYtq3F1+bo1OCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-06 11:58 ` Russell King - ARM Linux
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 [this message]
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=20170106150534.GF14217@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;
as well as URLs for NNTP newsgroup(s).