From: Andrew Lunn <andrew@lunn.ch>
To: Sven Schuchmann <schuchmann@schleissheimer.de>
Cc: "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 14:39:44 +0200 [thread overview]
Message-ID: <7778cd41-cf36-4524-a347-408a8fb0bde0@lunn.ch> (raw)
In-Reply-To: <BEZP281MB22458F571CC8251C141D933CD93F2@BEZP281MB2245.DEUP281.PROD.OUTLOOK.COM>
> So for me it somewhere happens in phylink_validate_mac_and_pcs()
I was expecting to see more debug output, but reading the code, i was
also thinking we need to look at phylink_validate_mac_and_pcs().
You are going in the correct direction putting lots of printk() in the
code. We need to find where it returns EINVAL:
static int phylink_validate_mac_and_pcs(struct phylink *pl,
unsigned long *supported,
struct phylink_link_state *state)
{
struct phylink_pcs *pcs = NULL;
unsigned long capabilities;
int ret;
/* Get the PCS for this interface mode */
if (pl->mac_ops->mac_select_pcs) {
pcs = pl->mac_ops->mac_select_pcs(pl->config, state->interface);
if (IS_ERR(pcs))
return PTR_ERR(pcs);
Possibly.
}
if (pcs) {
/* The PCS, if present, must be setup before phylink_create()
* has been called. If the ops is not initialised, print an
* error and backtrace rather than oopsing the kernel.
*/
if (!pcs->ops) {
phylink_err(pl, "interface %s: uninitialised PCS\n",
phy_modes(state->interface));
dump_stack();
We don't see a stack dump, so not here.
return -EINVAL;
}
/* Ensure that this PCS supports the interface which the MAC
* returned it for. It is an error for the MAC to return a PCS
* that does not support the interface mode.
*/
if (!phy_interface_empty(pcs->supported_interfaces) &&
!test_bit(state->interface, pcs->supported_interfaces)) {
phylink_err(pl, "MAC returned PCS which does not support %s\n",
phy_modes(state->interface));
No error message....
return -EINVAL;
}
/* Validate the link parameters with the PCS */
if (pcs->ops->pcs_validate) {
ret = pcs->ops->pcs_validate(pcs, supported, state);
if (ret < 0 || phylink_is_empty_linkmode(supported))
Could be...
return -EINVAL;
/* Ensure the advertising mask is a subset of the
* supported mask.
*/
linkmode_and(state->advertising, state->advertising,
supported);
}
}
/* Then validate the link parameters with the MAC */
if (pl->mac_ops->mac_get_caps)
capabilities = pl->mac_ops->mac_get_caps(pl->config,
state->interface);
else
capabilities = pl->config->mac_capabilities;
phylink_validate_mask_caps(supported, state, capabilities);
return phylink_is_empty_linkmode(supported) ? -EINVAL : 0;
Also possible.
}
In the end, we are probably going to find that what the MAC says its
capabilities are don't match what the PCS says it can do.
Thinking about that, it says phy mode RGMII. You generally don't use a
PCS with RGMII, so that is suspicious.
Andrew
next prev parent reply other threads:[~2026-05-06 12:39 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 [this message]
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
2026-05-07 6:52 ` AW: " 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=7778cd41-cf36-4524-a347-408a8fb0bde0@lunn.ch \
--to=andrew@lunn.ch \
--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