netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 10/11] net: dsa: mv88e6xxx: remove EEE support
Date: Tue, 1 Aug 2017 09:33:52 -0700	[thread overview]
Message-ID: <17c26dee-c285-4dd5-1be0-286c0126d4db@gmail.com> (raw)
In-Reply-To: <20170801160628.GJ23157@lunn.ch>

On 08/01/2017 09:06 AM, Andrew Lunn wrote:
> On Tue, Aug 01, 2017 at 11:36:13AM -0400, Vivien Didelot wrote:
>> Hi Andrew,
>>
>> Andrew Lunn <andrew@lunn.ch> writes:
>>
>>> On Mon, Jul 31, 2017 at 06:17:18PM -0400, Vivien Didelot wrote:
>>>> The PHY's EEE settings are already accessed by the DSA layer through the
>>>> Marvell PHY driver and there is nothing to be done for switch's MACs.
>>>
>>> I'm confused, or missing something. Does not patch #1 mean that if the
>>> DSA driver does not have a set_eee function, we always return -ENODEV
>>> in slave.c?
>>
>> If there is a PHY, phy_init_eee (if eee_enabled is true) and
>> phy_ethtool_set_eee is called. If there is a .set_eee op, it is
>> called. If both are absent, -ENODEV is returned.
> 
> O.K, i don't think that is correct. EEE should only be enabled if both
> the MAC and the PHY supports it. We need some way for the MAC to
> indicate it does not support EEE.

If the MAC does not support EEE but the PHY does I think you can still
allow EEE to be advertised and enabled, you just won't have the MAC be
able to leverage the power savings that EEE brings. AFAICT this is still
a valid mode whereby the PHY is put in a lower power mode, just not the
whole transmit path (MAC + PHY).

> 
> If set_eee is optional the meaning of a NULL pointer is that the MAC
> does support EEE. So for mv88e6060, lan9303, microchip and mt7530
> which currently don't support EEE, you need to add a set_eee which
> returns -ENODEV.
> 
> Having to implement the op to say you don't implement the feature just
> seems wrong.

If it is truly optional then we can either request drivers to implement
it and return something agreed upon, or just not implementing it means
we might be able to do EEE only at the PHY level.
-- 
Florian

  reply	other threads:[~2017-08-01 16:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 22:17 [PATCH net-next 00/11] net: dsa: rework EEE support Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 01/11] net: dsa: make EEE ops optional Vivien Didelot
2017-08-01 14:07   ` Andrew Lunn
2017-07-31 22:17 ` [PATCH net-next 02/11] net: dsa: qca8k: fix EEE init Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 03/11] net: dsa: qca8k: enable EEE once Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 04/11] net: dsa: qca8k: do not cache unneeded EEE fields Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 05/11] net: dsa: qca8k: remove qca8k_get_eee Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 06/11] net: dsa: bcm_sf2: remove unneeded supported flags Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 07/11] net: dsa: mv88e6xxx: call phy_init_eee Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 08/11] net: dsa: call phy_init_eee in DSA layer Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 09/11] net: dsa: remove PHY device argument from .set_eee Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 10/11] net: dsa: mv88e6xxx: remove EEE support Vivien Didelot
2017-08-01 14:28   ` Andrew Lunn
2017-08-01 15:36     ` Vivien Didelot
2017-08-01 16:06       ` Andrew Lunn
2017-08-01 16:33         ` Florian Fainelli [this message]
2017-08-01 17:27           ` Andrew Lunn
2017-08-01 18:53             ` Florian Fainelli
2017-08-01 16:34         ` Vivien Didelot
2017-08-01 20:08           ` Vivien Didelot
2017-07-31 22:17 ` [PATCH net-next 11/11] net: dsa: rename switch EEE ops Vivien Didelot
2017-08-01 14:31 ` [PATCH net-next 00/11] net: dsa: rework EEE support Andrew Lunn

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=17c26dee-c285-4dd5-1be0-286c0126d4db@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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).