Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Prashant Sengar <prashantsengar25031@gmail.com>
Cc: netdev@vger.kernel.org, Thangaraj.S@microchip.com,
	UNGLinuxDriver@microchip.com, andrew+netdev@lunn.ch,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH net v2] net: usb: lan78xx: avoid NULL PHY dereference in WoL setup
Date: Tue, 20 Oct 2026 16:02:00 +0200	[thread overview]
Message-ID: <3a48b21c-0209-4dde-9356-b127eb5fa58e@lunn.ch> (raw)
In-Reply-To: <CABW1sB=n--dJDK2zieM1bzOjG3AEwfZLTZ6HJrXLG+F1R1LB1A@mail.gmail.com>

On Tue, Oct 20, 2026 at 06:23:56PM +0530, Prashant Sengar wrote:
> Thanks, Andrew.
> 
> I understand that LAN78xx needs to advertise its MAC WoL capabilities and
> implement mac_wol_set() for phylink to handle controller-managed WoL.
> 
> Since this would involve additional changes and testing, I would like to keep
> v3 focused on preventing the NULL dereference by calling
> phylink_ethtool_set_wol() unconditionally.

So there are two different things.

1) Avoid the crash.
2) Make it actually work with a fixed link.

For net, you can do a quick and simple fix, which makes ethtool set
wol/get_wol return EOPNOTSUPP if there is no PHY. It did not work
before, it still does not work, so no regression. But the crash is
gone. And keep calling phylib, rather than phylink.

For net-next, you can add proper WoL support using phylink, and make
fixed-link work. Since it never worked, this is new development, so
should be for net-next.

	   Andrew

      parent reply	other threads:[~2026-10-20 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 19:31 [PATCH net v2] net: usb: lan78xx: avoid NULL PHY dereference in WoL setup Prashant Sengar
2026-10-19 19:39 ` netdev-bot+sinfo
2026-10-19 21:24 ` Andrew Lunn
2026-10-20  7:05   ` Prashant Sengar
2026-10-20 12:17     ` Andrew Lunn
     [not found]       ` <CABW1sB=n--dJDK2zieM1bzOjG3AEwfZLTZ6HJrXLG+F1R1LB1A@mail.gmail.com>
2026-10-20 14:02         ` 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=3a48b21c-0209-4dde-9356-b127eb5fa58e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Thangaraj.S@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prashantsengar25031@gmail.com \
    /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