Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables
From: Igor Russkikh <hidden>
Date: 2020-09-30 08:37:10
From: Igor Russkikh <hidden>
Date: 2020-09-30 08:37:10
quoted
switch (tuna->id) { + case ETHTOOL_PHY_EDPD: { + const u16 *val = data; + + /* msecs plays no role - configuration is always fixed inPHY */quoted
+ 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