Re: [PATCH] net: gianfar: add ethtool eee support

From: Andrew Lunn
Date: Tue Nov 28 2017 - 08:16:00 EST


On Tue, Nov 28, 2017 at 02:29:01PM +0800, Yangbo Lu wrote:
> From: Shaohui Xie <Shaohui.Xie@xxxxxxx>
>
> Gianfar does not support EEE, but it can connect to a PHY which supports
> EEE and the PHY advertises EEE by default, and its link partner also
> advertises EEE, so the PHY enters low power mode when traffic rate is low,
> which causes packet loss if an application's traffic rate is low. This
> patch provides .get_eee and .set_eee so that to disable the EEE
> advertisement via ethtool if needed, other EEE features are not supported.

Hi Yangbo

This patch is good, as far as it goes. However, as you said, some PHYs
advertise EEE by default. So i think it would be good to add a call to
phy_ethtool_set_eee() to disable advertisement, e.g. in init_phy().

Thanks
Andrew