Re: [PATCH] net: phy: DP83TC811: add reading of abilities

From: Andrew Lunn

Date: Fri May 08 2026 - 08:31:00 EST


On Fri, May 08, 2026 at 09:37:43AM +0200, Sven Schuchmann wrote:
> At this time the driver is not listing any speeds
> it supports. This should be ETHTOOL_LINK_MODE_100baseT1_Full_BIT
> for DP83TC811. Add the missing call for phylib to read the abilities.
>
> Signed-off-by: Sven Schuchmann <schuchmann@xxxxxxxxxxxxxxxxx>
> Suggested-by: Andrew Lunn <andrew@xxxxxxx>

Hi Sven

A good first attempt. Two things which should be improved.

netdev uses two trees. "net-next" for ongoing development work, and
"net" for fixes which will be backported in stable. This is a fix, so
should be on the "net" tree, and the Subject: line should indicate
"net":

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#git-trees-and-patch-flow

Since this is a Fix, it needs a Fixes: tag, indicating where the issue
was introduced.

The history is interesting. When it was first introduced in

commit b753a9faaf9aef1338c28ebd9ace6d749428788b
Author: Dan Murphy <dmurphy@xxxxxx>
Date: Fri May 11 13:08:19 2018 -0500

it had:

+static struct phy_driver dp83811_driver[] = {
+ {
+ .phy_id = DP83TC811_PHY_ID,
+ .phy_id_mask = 0xfffffff0,
+ .name = "TI DP83TC811",
+ .features = PHY_BASIC_FEATURES,

The commit message does not mention it is a T1 PHY. PHY_BASIC_FEATURES
means it is a standard 10/100 BASE-T PHY, not a T1 PHY.

Then in

commit dcdecdcfe1fc39ded8590aed2fe84d62f14b2392
Author: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date: Fri Apr 12 20:47:03 2019 +0200

net: phy: switch drivers to use dynamic feature detection

That line got commented out, when we starting using the registers of
the PHY to enumerate its capabilities. So at that point, it want from
being a 10/100 BASE-T to not listing any link modes.

I would say it was wrong from the beginning, so use of Fixes: tag of.

Fixes: b753a9faaf9a ("net: phy: DP83TC811: Introduce support for the DP83TC811 phy")

Anybody trying to backport the fix that far will fail, because
genphy_c45_pma_read_ext_abilities() did not exist back then. But it
should work for modern LTS kernels.

Andrew

---
pw-bot: cr