Re: [RFC] net: dsa: slave: Advertise correct EEE capabilities at slave PHY setup
From: Andrew Lunn
Date: Tue May 30 2023 - 10:25:34 EST
On Tue, May 30, 2023 at 04:07:43PM +0200, Lukasz Majewski wrote:
> Hi Russell,
>
> > On Tue, May 30, 2023 at 02:26:21PM +0200, Lukasz Majewski wrote:
> > > One can disable in device tree advertising of EEE capabilities of
> > > PHY when 'eee-broken-100tx' property is present in DTS.
> > >
> > > With DSA switch it also may happen that one would need to disable
> > > EEE due to some network issues.
> > >
> > > Corresponding switch DTS description:
> > >
> > > switch@0 {
> > > ports {
> > > port@0 {
> > > reg = <0>;
> > > label = "lan1";
> > > phy-handle = <&switchphy0>;
> > > };
> > > }
> > > mdio {
> > > switchphy0: switchphy@0 {
> > > reg = <0>;
> > > eee-broken-100tx;
> > > };
> > > };
> > >
> > > This patch adjusts the content of MDIO_AN_EEE_ADV in MDIO_MMD_AN
> > > "device" so the phydev->eee_broken_modes are taken into account
> > > from the start of the slave PHYs.
> >
> > This should be handled by phylib today in recent kernels without the
> > need for any patch (as I describe below, because the config_aneg PHY
> > method should be programming it.) Are you seeing a problem with it
> > in 6.4-rc?
>
> Unfortunately, for this project I use LTS 5.15.z kernel.
>
> My impression is that the mv88e6xxx driver is not handling EEE setup
> during initialization (even with v6.4-rc).
In general, nearly every driver gets EEE wrong. I have a patchset
which basically rewrites EEE. It has been posted as RFC a couple
times, and i plan to start posting it for merging this week.
But as a result, don't expect EEE to actually work with any LTS
kernel.
Andrew