netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Igor Russkikh <irusskikh@marvell.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>
Subject: Re: [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables
Date: Wed, 30 Sep 2020 11:37:00 +0300	[thread overview]
Message-ID: <b43fb357-3fd1-c1a5-e2ff-894eb11c2bbb@marvell.com> (raw)
In-Reply-To: <20200929171815.GD3996795@lunn.ch>


>>  	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

  reply	other threads:[~2020-09-30  8:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 16:13 [PATCH net-next 0/3] net: atlantic: phy tunables from mac driver Igor Russkikh
2020-09-29 16:13 ` [PATCH net-next 1/3] ethtool: allow netdev driver to define phy tunables Igor Russkikh
2020-09-29 16:13 ` [PATCH net-next 2/3] net: atlantic: implement phy downshift feature Igor Russkikh
2020-09-29 17:10   ` Andrew Lunn
2020-09-30  8:34     ` Igor Russkikh
2020-09-29 16:13 ` [PATCH net-next 3/3] net: atlantic: implement media detect feature via phy tunables Igor Russkikh
2020-09-29 17:18   ` Andrew Lunn
2020-09-30  8:37     ` Igor Russkikh [this message]
2020-09-30 14:22       ` Andrew Lunn
2020-10-01 10:18         ` [EXT] " Igor Russkikh
2020-10-01 12:56           ` Andrew Lunn
2020-09-29 17:04 ` [PATCH net-next 0/3] net: atlantic: phy tunables from mac driver Andrew Lunn
2020-09-29 17:33   ` Jakub Kicinski
2020-09-29 18:47     ` Andrew Lunn
2020-09-30  0:09       ` Jakub Kicinski
2020-09-30  0:16         ` Andrew Lunn
2020-09-30 15:03   ` ethtool/phy tunables and extack (was Re: [PATCH net-next 0/3] net: atlantic: phy tunables from mac driver) Michal Kubecek
2020-09-30 15:16     ` Andrew Lunn
2020-09-30 15:31       ` Michal Kubecek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b43fb357-3fd1-c1a5-e2ff-894eb11c2bbb@marvell.com \
    --to=irusskikh@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).