Netdev List
 help / color / mirror / Atom feed
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:52:57 +0200	[thread overview]
Message-ID: <43c0d352-5637-419d-b48f-6c03d8018cf3@lunn.ch> (raw)
In-Reply-To: <BEZP281MB224573FE237813F5DE192A95D93F2@BEZP281MB2245.DEUP281.PROD.OUTLOOK.COM>

On Wed, May 06, 2026 at 12:30:33PM +0000, Sven Schuchmann wrote:
> Hi Andrew,
> 
> I came up with this:
> 
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
> index 261af300ab00..734cb62a1043 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/usb/lan78xx.c
> @@ -2862,7 +2862,9 @@ static int lan78xx_phylink_setup(struct lan78xx_net *dev)
>  static void lan78xx_phy_uninit(struct lan78xx_net *dev)
>  {
>         if (dev->phylink) {
> +               rtnl_lock();
>                 phylink_disconnect_phy(dev->phylink);
> +               rtnl_unlock();
>                 phylink_destroy(dev->phylink);
>                 dev->phylink = NULL;
>         }
> 
> and it seems to prevent the cash. What do you think?

Does the Ethernet also work?

As i said, there appears to be two things going on. For some reason it
decides the PHY and MAC don't make a valid combination and returns
-EINVAL.

And then we have the RTNL problem.

We should fix the RTNL problem, but that on its own will probably not
give you working Ethernet.

Right let me look at the context we are in when
phylink_disconnect_phy() is called. See if this fix is correct.

	Andrew

      reply	other threads:[~2026-05-06 12:52 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
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 [this message]

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=43c0d352-5637-419d-b48f-6c03d8018cf3@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