From: Florian Fainelli <f.fainelli@gmail.com>
To: Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
Andrew Lunn <andrew@lunn.ch>,
Yegor Yefremov <yegorslists@googlemail.com>
Cc: netdev <netdev@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Grygorii Strashko <grygorii.strashko@ti.com>,
"N, Mugunthan V" <mugunthanvnm@ti.com>,
Rami Rosen <roszenrami@gmail.com>,
Fabrice GASNIER <fabrice.gasnier@st.com>
Subject: Re: [PATCH v2] cpsw: ethtool: add support for getting/setting EEE registers
Date: Wed, 4 Jan 2017 06:33:03 -0800 [thread overview]
Message-ID: <eb4a3c77-6bf4-8749-85a3-b614bff69cf2@gmail.com> (raw)
In-Reply-To: <5809df57-997b-3531-838f-8c5a61605fe5@gmail.com>
On 12/02/2016 09:48 AM, Florian Fainelli wrote:
>>> Peppe, any thoughts on this?
>>
>> I share what you say.
>>
>> In sum, the EEE management inside the stmmac is:
>>
>> - the driver looks at own HW cap register if EEE is supported
>>
>> (indeed the user could keep disable EEE if bugged on some HW
>> + Alex, Fabrice: we had some patches for this to propose where we
>> called the phy_ethtool_set_eee to disable feature at phy
>> level
>>
>> - then the stmmac asks PHY layer to understand if transceiver and
>> partners are EEE capable.
>>
>> - If all matches the EEE is actually initialized.
>>
>> the logic above should be respected when use ethtool, hmm, I will
>> check the stmmac_ethtool_op_set_eee asap.
>>
>> Hoping this is useful
>
> This is definitively useful, the only part that I am struggling to
> understand in phy_init_eee() is this:
>
> eee_adv = phy_read_mmd_indirect(phydev, MDIO_AN_EEE_ADV,
> MDIO_MMD_AN);
> if (eee_adv <= 0)
> goto eee_exit_err;
>
> if we are not already advertising EEE in the PHY's MMIO_MMD_AN page, by
> the time we call phy_init_eee(), then we cannot complete the EEE
> configuration at the PHY level, and presumably we should abort the EEE
> configuration at the MAC level.
>
> While this condition makes sense if e.g: you are re-negotiating the link
> with your partner for instance and if EEE was already advertised, the
> very first time this function is called, it seems to be like we should
> skip the check, because phy_init_eee() should actually tell us if, as a
> result of a successful check, we should be setting EEE as something we
> advertise?
>
> Do you remember what was the logic behind this check when you added it?
Peppe, can you remember why phy_init_eee() was written in a way that you
need to have already locally advertised EEE for the function to
successfully return? Thank you!
--
Florian
next prev parent reply other threads:[~2017-01-04 14:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 14:38 [PATCH v2] cpsw: ethtool: add support for getting/setting EEE registers yegorslists
2016-11-23 14:47 ` Rami Rosen
2016-11-23 17:33 ` Florian Fainelli
2016-11-23 20:08 ` Yegor Yefremov
2016-11-23 20:15 ` Florian Fainelli
2016-11-24 9:25 ` Yegor Yefremov
2016-11-24 15:38 ` Andrew Lunn
2016-11-24 18:23 ` Florian Fainelli
2016-12-02 9:11 ` Giuseppe CAVALLARO
2016-12-02 17:48 ` Florian Fainelli
2017-01-04 14:33 ` Florian Fainelli [this message]
2017-04-18 13:23 ` Niklas Cassel
2017-04-18 16:40 ` Florian Fainelli
2017-04-25 9:06 ` Niklas Cassel
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=eb4a3c77-6bf4-8749-85a3-b614bff69cf2@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=fabrice.gasnier@st.com \
--cc=grygorii.strashko@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=roszenrami@gmail.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).