From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Lukasz Majewski <lukma@denx.de>
Cc: Vladimir Oltean <olteanv@gmail.com>,
Tristram.Ha@microchip.com,
Oleksij Rempel <linux@rempel-privat.de>,
Arun Ramadoss <arun.ramadoss@microchip.com>,
f.fainelli@gmail.com, andrew@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, Woojung.Huh@microchip.com,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH 2/2] net: dsa: microchip: Provide Module 4 KSZ9477 errata (DS80000754C)
Date: Tue, 29 Aug 2023 19:12:05 +0200 [thread overview]
Message-ID: <20230829171205.GE31399@pengutronix.de> (raw)
In-Reply-To: <20230829172913.518210b0@wsk>
On Tue, Aug 29, 2023 at 05:29:13PM +0200, Lukasz Majewski wrote:
> Hi Oleksij,
> > On other hand, since this functionality is not listed as supported by
> > the KSZ9477 datasheet (No word about IEEE 802.3az Energy Efficient
> > Ethernet (EEE)) compared to KSZ8565R datasheet (where EEE support is
> > listed) and it is confirmed to work not stable enough, then it should
> > be disabled properly.
>
> I've described this problem in more details here:
> https://lore.kernel.org/lkml/20230829132429.529283be@wsk/
>
> -------->8---------
> The issue is that ksz9477_config_init() (drivers/net/phy/micrel.c) is
> executed AFTER generic phy_probe():
> https://elixir.bootlin.com/linux/latest/source/drivers/net/phy/phy_device.c#L3256
> in which the EEE advertisement registers are read.
>
> Hence, those registers needs to be cleared earlier - as I do in
> ksz9477_setup() in drivers/net/dsa/microchip/ksz9477.
>
> Here the precedence matters ...
> ----------8<-------------
>
> > The phydev->supported_eee should be cleared.
> > See ksz9477_get_features().
> >
>
> Removing the linkmod_and() from ksz9477_get_features():
> https://elixir.bootlin.com/linux/latest/source/drivers/net/phy/micrel.c#L1408
>
> doesn't help.
Yes, removing linkmod_and() will not should not help. I said, "The
phydev->supported_eee should be cleared."
For example like this:
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1400,6 +1400,7 @@ static int ksz9131_config_aneg(struct phy_device *phydev)
static int ksz9477_get_features(struct phy_device *phydev)
{
+ __ETHTOOL_DECLARE_LINK_MODE_MASK(zero) = { 0, };
int ret;
ret = genphy_read_abilities(phydev);
@@ -1413,7 +1414,7 @@ static int ksz9477_get_features(struct phy_device *phydev)
* KSZ8563R should have 100BaseTX/Full only.
*/
linkmode_and(phydev->supported_eee, phydev->supported,
- PHY_EEE_CAP1_FEATURES);
+ zero);
return 0;
}
You will need to clear it only on KSZ9477 variants with this bug.
This change is tested and it works on my KSZ9477-EVB.
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2023-08-29 17:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 15:48 [PATCH 1/2] net: dsa: microchip: KSZ9477: Provide functions to access MMD registers Lukasz Majewski
2023-08-24 15:48 ` [PATCH 2/2] net: dsa: microchip: Provide Module 4 KSZ9477 errata (DS80000754C) Lukasz Majewski
2023-08-24 15:54 ` Florian Fainelli
2023-08-25 7:42 ` Lukasz Majewski
2023-08-25 1:12 ` Tristram.Ha
2023-08-25 8:39 ` Lukasz Majewski
2023-08-25 15:26 ` Florian Fainelli
2023-08-25 18:48 ` Tristram.Ha
2023-08-26 10:49 ` Vladimir Oltean
2023-08-29 8:35 ` Lukasz Majewski
2023-08-29 10:18 ` Vladimir Oltean
2023-08-29 11:24 ` Lukasz Majewski
2023-08-29 11:47 ` Oleksij Rempel
2023-08-29 12:38 ` Lukasz Majewski
2023-08-29 14:42 ` Oleksij Rempel
2023-08-29 15:29 ` Lukasz Majewski
2023-08-29 17:12 ` Oleksij Rempel [this message]
2023-08-29 22:23 ` Tristram.Ha
2023-08-30 6:16 ` Oleksij Rempel
2023-08-30 8:13 ` Lukasz Majewski
2023-08-29 21:57 ` Tristram.Ha
2023-08-29 22:00 ` Florian Fainelli
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=20230829171205.GE31399@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=lukma@denx.de \
--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 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).