Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sven Schuchmann <schuchmann@schleissheimer.de>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: assert in phylink.c with lan7801 and dp83tc811 since kernel 6.18
Date: Wed, 6 May 2026 18:40:20 +0200	[thread overview]
Message-ID: <24815161-68ff-4f3e-b0e1-286871b9686a@lunn.ch> (raw)
In-Reply-To: <BEZP281MB22457317618130F28E84E3B4D93F2@BEZP281MB2245.DEUP281.PROD.OUTLOOK.COM>

> 	phylink_dbg(pl, "phy: --3.4 supported    0x%x\n", supported);

supported is a pointer, so you cannot get anything useful from
printing its value.

> [    2.771616] lan78xx 1-1.4:1.0 (unnamed net_device) (uninitialized): validation of rgmii-id with support 00000000,00000000,00000000,00006280 and advertisement 00000000,00000000,00000000,00006280 failed: -EINVAL
 
> But I do not get what phylink_is_empty_linkmode() is doing...

The supported value is a combination of a few things. It indicates if
the PHY supports auto negotiation, pause, asym pause, if the link is
using twisted pair, fibre etc. It also lists the speeds the PHY
supports. There is a list here:

https://elixir.bootlin.com/linux/v7.0.1/source/include/uapi/linux/ethtool.h#L1963

Decoding 00006280 we get:

ETHTOOL_LINK_MODE_TP_BIT,
ETHTOOL_LINK_MODE_MII_BIT,
ETHTOOL_LINK_MODE_Pause_BIT,
ETHTOOL_LINK_MODE_Asym_Pause_BIT

So Maxime was correct, it is not listing any link speeds. From what i
understand, it is a 100BaseT1? So you would expect to see:

ETHTOOL_LINK_MODE_100baseT1_Full_BIT

which is bit 67.

phylib asks the PHY what it can do. For BaseT1 that would be
genphy_c45_pma_baset1_read_abilities()

https://elixir.bootlin.com/linux/v7.0.1/source/drivers/net/phy/phy-c45.c#L971

either the PHY has the wrong value in its register, or the function is
not getting called.

The PHY is an dp83tc811?

https://elixir.bootlin.com/linux/v7.0.1/source/drivers/net/phy/dp83tc811.c#L387

It does not set .get_features. However, dp83tg720.c does:

https://elixir.bootlin.com/linux/v7.0.1/source/drivers/net/phy/dp83tg720.c#L654

So try adding:

	.get_features	= genphy_c45_pma_read_ext_abilities,

	Andrew

  reply	other threads:[~2026-05-06 16:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05  9:53 assert in phylink.c with lan7801 and dp83tc811 since kernel 6.18 Sven Schuchmann
2026-05-05 13:13 ` Andrew Lunn
2026-05-06 11:10   ` AW: " Sven Schuchmann
2026-05-06 12:39     ` Andrew Lunn
2026-05-06 13:04       ` Maxime Chevallier
2026-05-06 13:18         ` Andrew Lunn
2026-05-06 16:00           ` AW: " Sven Schuchmann
2026-05-06 16:40             ` Andrew Lunn [this message]
2026-05-07  6:52               ` Sven Schuchmann
2026-05-07 12:49                 ` Andrew Lunn
2026-05-06 13:15     ` Andrew Lunn
2026-05-06 14:36       ` AW: " Sven Schuchmann
2026-05-06 12:30   ` Sven Schuchmann
2026-05-06 12:52     ` Andrew Lunn

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=24815161-68ff-4f3e-b0e1-286871b9686a@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=schuchmann@schleissheimer.de \
    /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