All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, rayagond@vayavyalabs.com
Subject: Re: [net-next 2/4] net: ethtool: add the EEE support
Date: Thu, 08 Mar 2012 16:14:10 +0100	[thread overview]
Message-ID: <4F58CCC2.1060304@st.com> (raw)
In-Reply-To: <1331052982.2333.17.camel@bwh-desktop>

Hello Ben

On 3/6/2012 5:56 PM, Ben Hutchings wrote:
> On Tue, 2012-03-06 at 09:28 +0100, Giuseppe CAVALLARO wrote:
>> This patch adds two new functions to detect if Energy-Efficient
>> Ethernet (EEE) is supported and the way to enable/disable it.
> [...]
> 
> You haven't fixed any of the problems in the previous version of this
> patch.

Yes you are right,  sorry :-(

Below there is what you suggested and inline my comments.

Welcome advice!

On 2/29/2012 6:00 PM, Ben Hutchings wrote:

> It is certainly necessary to distinguish:
> a. PHY is advertising EEE
> from
> b. Link partner is advertising EEE
> or
> c. EEE will be used (= a && b)

you are perfectly right and indeed I wanted to do that.

> I haven't had anything to do with PHY drivers for a while but it looks
> like you should be able to map MDIO register 3.20 to supported flags,
> 7.60 to advertising and 7.61 to lp_advertising.

I have added a function named:

    phy_check_eee

For example, the stmmac driver (only if its HW core supports the EEE
feature) calls the phy_check_eee to understand if the the points a) and
b) above are satisfied.

On the Ethtool side, within the driver the .get_eee will pass to the
user-space if the EEE is used (just point c).
The .set_eee should used to force the MAC to disable/enable the EEE (if
actually supported by MAC+PHY).
I had added this option because the Synopsys GMAC manages the TX LPI
path through a SW timer :-( that in this case can be disabled via ethtool.
Indeed, no action should be taken by the user for the PHY side.
The only thing that could be changed is the clock stop enable bit (3.0.10).

What do you think?

Peppe

>
> Even if your particular device doesn't support these MDIO registers,
> other devices will.  So I think you should define the flags and then if
> you don't have that fine control you should check in your set_settings
> implementation that the advertising value either has all the EEE mode
> flags clear or has all the modes the hardware supports set.
>
> Ben.
>




> Ben.
> 

  reply	other threads:[~2012-03-08 15:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 12:44 [PATCH 0/4 (net.git)] stmmac EEE support Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 1/4] phy: add the EEE support and the way to access to the MMD regs Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 2/4] net: ethtool: add the EEE support Giuseppe CAVALLARO
2012-02-28 15:45   ` Ben Hutchings
2012-02-29 16:12     ` Giuseppe CAVALLARO
2012-02-29 17:00       ` Ben Hutchings
2012-02-28 12:44 ` [PATCH 3/4] stmmac: update the driver Documentation and add EEE Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 4/4] stmmac: add the Energy Efficient Ethernet support Giuseppe CAVALLARO
2012-02-28 12:46 ` [PATCH] ethtool: add the EEE option Giuseppe CAVALLARO
2012-02-28 20:18 ` [PATCH 0/4 (net.git)] stmmac EEE support David Miller
2012-02-29 16:07   ` Giuseppe CAVALLARO
2012-03-06  8:28     ` [net-next 0/4] stmmac: add the " Giuseppe CAVALLARO
2012-03-06  8:28       ` [net-next 1/4] phy: add the EEE support and the way to access to the MMD regs Giuseppe CAVALLARO
2012-03-06 16:55         ` Ben Hutchings
2012-03-06 17:05           ` Ben Hutchings
2012-03-08 14:54             ` Giuseppe CAVALLARO
2012-03-08 18:29               ` Ben Hutchings
2012-03-09 14:39                 ` Giuseppe CAVALLARO
2012-03-06  8:28       ` [net-next 2/4] net: ethtool: add the EEE support Giuseppe CAVALLARO
2012-03-06 16:56         ` Ben Hutchings
2012-03-08 15:14           ` Giuseppe CAVALLARO [this message]
2012-03-06  8:28       ` [net-next 3/4] stmmac: update the driver Documentation and add EEE Giuseppe CAVALLARO
2012-03-06  8:28       ` [net-next 4/4] stmmac: add the Energy Efficient Ethernet support Giuseppe CAVALLARO

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=4F58CCC2.1060304@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rayagond@vayavyalabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.