All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active directly, instead of phy_init_eee
Date: Tue, 11 Mar 2025 14:05:00 +0100	[thread overview]
Message-ID: <7e976ad4-9eec-46ff-947a-dbc3ddd1532d@gmail.com> (raw)
In-Reply-To: <ec50da60-dde3-45ca-aa6c-eebf59fc5ec5@lunn.ch>

On 11.03.2025 13:41, Andrew Lunn wrote:
> On Tue, Mar 11, 2025 at 07:39:33AM +0100, Heiner Kallweit wrote:
>> Use genphy_c45_eee_is_active directly instead of phy_init_eee,
>> this prepares for removing phy_init_eee. With the second
>> argument being Null, phy_init_eee doesn't initialize anything.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>>  drivers/net/dsa/b53/b53_common.c | 5 +----
>>  1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
>> index 61d164ffb..17e3ead16 100644
>> --- a/drivers/net/dsa/b53/b53_common.c
>> +++ b/drivers/net/dsa/b53/b53_common.c
>> @@ -2212,10 +2212,7 @@ EXPORT_SYMBOL(b53_mirror_del);
>>   */
>>  int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
>>  {
>> -	int ret;
>> -
>> -	ret = phy_init_eee(phy, false);
>> -	if (ret)
>> +	if (!phy->drv || genphy_c45_eee_is_active(phy, NULL) <= 0)
>>  		return 0;
> 
> genphy_c45_eee_is_active() is a function which could be considered
> phylib internal. At least, it currently has no users outside of the
> phylib core.
> 
> b53 uses phylink not phylib, so i actually think it would be better to
> convert it to the phylink way to do EEE, rather than make use of a
> phylib helper.
> 
Right, this would be a more comprehensive approach.

> 	Andrew
> 
> 	

--
pw-bot: cr


      reply	other threads:[~2025-03-11 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11  6:39 [PATCH net-next] net: dsa: b53: use genphy_c45_eee_is_active directly, instead of phy_init_eee Heiner Kallweit
2025-03-11 12:41 ` Andrew Lunn
2025-03-11 13:05   ` Heiner Kallweit [this message]

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=7e976ad4-9eec-46ff-947a-dbc3ddd1532d@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.