[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2020 18:08:47 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Russell King <rmk+kernel@...linux.org.uk>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Antoine Tenart <antoine.tenart@...tlin.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/3] net: phy: marvell10g: add energy detect
power down tunable
> +static int mv3310_get_tunable(struct phy_device *phydev,
> + struct ethtool_tunable *tuna, void *data)
> +{
> + switch (tuna->id) {
> + case ETHTOOL_PHY_EDPD:
> + return mv3310_get_edpd(phydev, data);
> + default:
> + return -EINVAL;
> + }
> +}
> +
> +static int mv3310_set_tunable(struct phy_device *phydev,
> + struct ethtool_tunable *tuna, const void *data)
> +{
> + switch (tuna->id) {
> + case ETHTOOL_PHY_EDPD:
> + return mv3310_set_edpd(phydev, *(u16 *)data);
> + default:
> + return -EINVAL;
> + }
> +}
Hi Russell
Looking at other PHY drivers, all but mscc.c return EOPNOTSUPP.
mscc.c is the only other driver which returns EINVAL. EOPNOTSUPP does
seem more appropriate.
Thanks
Andrew
Powered by blists - more mailing lists