[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b43fb357-3fd1-c1a5-e2ff-894eb11c2bbb@marvell.com>
Date: Wed, 30 Sep 2020 11:37:00 +0300
From: Igor Russkikh <irusskikh@...vell.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, "David S . Miller" <davem@...emloft.net>,
"Jakub Kicinski" <kuba@...nel.org>
Subject: Re: [PATCH net-next 3/3] net: atlantic: implement media detect
feature via phy tunables
>> switch (tuna->id) {
>> + case ETHTOOL_PHY_EDPD: {
>> + const u16 *val = data;
>> +
>> + /* msecs plays no role - configuration is always fixed in
> PHY */
>> + aq_nic->aq_nic_cfg.is_media_detect = *val ? 1 : 0;
>
> This is the wrong usage of the API:
>
> include/uapi/linux/ethtool.h:
>
> * The interval units for TX wake-up are in milliseconds, since this should
> * cover a reasonable range of intervals:
> * - from 1 millisecond, which does not sound like much of a power-saver
> * - to ~65 seconds which is quite a lot to wait for a link to come up
> when
> * plugging a cable
> */
>
> I guess your PHY is not hard coded to 1 millisecond? Please return the
> real value. And the set call should really only allow 0, or the value
> the PHY is using.
The problem here is that FW interface only allows us to switch this mode on or
off. We can't control the interval value for this device.
Thus, we only can enable it, or disable. Basically ignoring the interval value.
Igor
Powered by blists - more mailing lists