[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3a9240f6-442e-42f3-9c2d-7222c21d5e79@lunn.ch>
Date: Mon, 27 Oct 2025 20:26:28 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Emanuele Ghidoli <ghidoliemanuele@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Emanuele Ghidoli <emanuele.ghidoli@...adex.com>,
Oleksij Rempel <o.rempel@...gutronix.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v1] net: phy: dp83867: Disable EEE support as not
implemented
> Your placement is the only possible location as the code currently
> stands, but I would like to suggest that of_set_phy_eee_broken()
> should _not_ be calling linkmode_zero(modes), and we should be able
> to set phydev->eee_disabled_modes in the .get_features() method.
>
> Andrew, would you agree?
I dug back through the git history. Originally, the code would read a
value from DT which was literally used as a mask against the value in
MDIO_MMD_AN. If the mask was not zero, it was applied. That later got
converted to a collection of Boolean DT properties, one per link
speed, and the mask was created as a collection of |= statements, with
the initial value being 0, and the result assigned to
phydev->eee_broken_modes. It would of been possible at that stage to
do phydev->eee_broken_modes |=, but it guess a local variable was used
to keep the lines shorter. The u32 then got converted to a linux
bitmap, with the initial = 0; replaced with a linkmode_zero().
I don't see anything in any of the commit messages to indicate there
was a reason to initialise phydev->eee_broken_modes to 0 before
parsing the DT properties.
So i think it should be O.K. to remove the linkmode_zero(). For broken
PHYs like this, the earlier we mask out the broken behaviour the
better.
Andrew
Powered by blists - more mailing lists