mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastien Curutchet <bastien.curutchet@bootlin.com>
To: Paolo Abeni <pabeni@redhat.com>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Russell King <linux@armlinux.org.uk>
Cc: "Pascal Eberhard" <pascal.eberhard@se.com>,
	"Miquèl Raynal" <miquel.raynal@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tristram Ha" <tristram.ha@microchip.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 5/9] net: dsa: microchip: implement .support_eee() only if needed
Date: Tue, 2 Jun 2026 14:21:26 +0200	[thread overview]
Message-ID: <aba1f7f6-612b-4c0f-99fd-4a5f0ee0b221@bootlin.com> (raw)
In-Reply-To: <aa312024-16ae-4984-98bb-d530abb71207@redhat.com>

Hi Paolo,

On 6/1/26 10:55 AM, Paolo Abeni wrote:
> On 5/26/26 11:47 AM, Bastien Curutchet (Schneider Electric) wrote:
>> diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
>> index a39541d29ad5..e0b3724a7558 100644
>> --- a/drivers/net/dsa/microchip/ksz9477.c
>> +++ b/drivers/net/dsa/microchip/ksz9477.c
>> @@ -1909,6 +1909,54 @@ void ksz9477_phylink_mac_link_up(struct phylink_config *config,
>>   	ksz9477_duplex_flowctrl(dev, port, duplex, tx_pause, rx_pause);
>>   }
>>   
>> +/**
>> + * ksz9477_support_eee - Determine Energy Efficient Ethernet (EEE) support for a
>> + *                       port
>> + * @ds: Pointer to the DSA switch structure
>> + * @port: Port number to check
>> + *
>> + * This function also documents devices where EEE was initially advertised but
>> + * later withdrawn due to reliability issues, as described in official errata
>> + * documents. These devices are explicitly listed to record known limitations,
>> + * even if there is no technical necessity for runtime checks.
>> + *
>> + * Returns: true if the internal PHY on the given port supports fully
>> + * operational EEE, false otherwise.
>> + */
>> +static bool ksz9477_support_eee(struct dsa_switch *ds, int port)
>> +{
>> +	struct ksz_device *dev = ds->priv;
>> +
>> +	if (!dev->info->internal_phy[port])
>> +		return false;
>> +
>> +	switch (dev->chip_id) {
>> +	case KSZ8563_CHIP_ID:
>> +	case KSZ9563_CHIP_ID:
>> +	case KSZ9893_CHIP_ID:
>> +		return true;
>> +	default:
>> +		/* KSZ8567R Errata DS80000752C Module 4 */
>> +		/* KSZ9477S Errata DS80000754A Module 4 */
>> +		/* KSZ9567S Errata DS80000756A Module 4 */
>> +		/* KSZ9896C Errata DS80000757A Module 3 */
>> +		/* KSZ9897R Errata DS80000758C Module 4 */
> 
> Sashiko noted that errata:
> 
> 		/* KSZ879x/KSZ877x/KSZ876x Errata DS80000687C Module 2 */
> 
> has been lost above.

Yes that was more or less intended because KSZ879x/KSZ877x/KSZ876x don't 
belong to the KSZ9477 family. I haven't found a relevant place to move 
this comment as .support_eee() is removed from ksz8.c, maybe I should 
have mentioned it in the commit log.

> 
>> diff --git a/drivers/net/dsa/microchip/lan937x_main.c b/drivers/net/dsa/microchip/lan937x_main.c
>> index f8f220242f7a..4cbbcf7993c9 100644
>> --- a/drivers/net/dsa/microchip/lan937x_main.c
>> +++ b/drivers/net/dsa/microchip/lan937x_main.c
>> @@ -915,7 +915,6 @@ const struct dsa_switch_ops lan937x_switch_ops = {
>>   	.port_txtstamp		= ksz_port_txtstamp,
>>   	.port_rxtstamp		= ksz_port_rxtstamp,
>>   	.port_setup_tc		= ksz_setup_tc,
>> -	.support_eee		= ksz_support_eee,
>>   	.set_mac_eee		= ksz_set_mac_eee,
> 
> Sashiko noted that `set_mac_eee` usage is gated by `support_eee` presence,
> you may want to remove even the set callback.
> 

True, will do.



Best regards,
Bastien

  reply	other threads:[~2026-06-02 12:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  9:47 [PATCH net-next 0/9] net: dsa: microchip: remove unnecessary dsa_switch_ops callbacks Bastien Curutchet (Schneider Electric)
2026-05-26  9:47 ` [PATCH net-next 1/9] net: dsa: microchip: remove useless common cls_flower_{add/del} operations Bastien Curutchet (Schneider Electric)
2026-05-26  9:47 ` [PATCH net-next 2/9] net: dsa: microchip: remove VLAN operations for ksz8463 Bastien Curutchet
2026-05-26  9:47 ` [PATCH net-next 3/9] net: dsa: microchip: implement get_phy_flags only if needed Bastien Curutchet (Schneider Electric)
2026-05-26  9:47 ` [PATCH net-next 4/9] net: dsa: microchip: remove setup_rgmii_delay() KSZ operation Bastien Curutchet (Schneider Electric)
2026-06-01  8:49   ` Paolo Abeni
2026-06-02 12:15     ` Bastien Curutchet
2026-05-26  9:47 ` [PATCH net-next 5/9] net: dsa: microchip: implement .support_eee() only if needed Bastien Curutchet (Schneider Electric)
2026-06-01  8:55   ` Paolo Abeni
2026-06-02 12:21     ` Bastien Curutchet [this message]
2026-05-26  9:47 ` [PATCH net-next 6/9] net: dsa: microchip: implement .{get/set}_wol " Bastien Curutchet (Schneider Electric)
2026-06-01  8:59   ` Paolo Abeni
2026-06-02 12:34     ` Bastien Curutchet
2026-05-26  9:47 ` [PATCH net-next 7/9] net: dsa: microchip: implement port_hsr_join for KSZ9477 only Bastien Curutchet (Schneider Electric)
2026-06-01  9:03   ` Paolo Abeni
2026-06-02 12:35     ` Bastien Curutchet
2026-06-02 14:06       ` Bastien Curutchet
2026-05-26  9:47 ` [PATCH net-next 8/9] net: dsa: microchip: implement lan937x-specific MDIO registration Bastien Curutchet (Schneider Electric)
2026-05-26  9:47 ` [PATCH net-next 9/9] net: dsa: microchip: implement port_teardown only if needed Bastien Curutchet (Schneider Electric)

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=aba1f7f6-612b-4c0f-99fd-4a5f0ee0b221@bootlin.com \
    --to=bastien.curutchet@bootlin.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pascal.eberhard@se.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tristram.ha@microchip.com \
    --cc=woojung.huh@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome