Re: [EXT] Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-01 Thread Andrew Lunn
On Thu, Oct 01, 2020 at 01:18:06PM +0300, Igor Russkikh wrote: > Hi Andrew, > > > Since this is your own PHY, not some magical black box, i assume you > > actually know what value it is using? It probably even lists it in the > > data sheet. > > > > So just hard code that value in the driver. Tha

Re: [EXT] Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-01 Thread Igor Russkikh
Hi Andrew, > Since this is your own PHY, not some magical black box, i assume you > actually know what value it is using? It probably even lists it in the > data sheet. > > So just hard code that value in the driver. That has got to be better > than saying the incorrect value of 1ms. You mean al

Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-09-30 Thread Andrew Lunn
> 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. Hi Igor Since this is your own PHY, not some magical black box, i assum

Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-09-30 Thread Igor Russkikh
>> 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: >

Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-09-29 Thread Andrew Lunn
> @@ -923,6 +923,12 @@ static int aq_ethtool_get_phy_tunable(struct net_device > *ndev, > struct aq_nic_s *aq_nic = netdev_priv(ndev); > > switch (tuna->id) { > + case ETHTOOL_PHY_EDPD: { > + u16 *val = data; > + > + *val = (u16)aq_nic->aq_nic_cfg.is_media

[PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-09-29 Thread Igor Russkikh
Mediadetect is another name for the EDPD (energy detect power down). This feature allows device to save extra power when no link is available. PHY goes into the extreme power saving mode and only periodically wakes up and checks for the link. The feature may increase linkup time. Signed-off-by: