Thread (1 message) 1 message, 1 author, 1d ago

Re: [PATCH net v2] net: usb: lan78xx: avoid NULL PHY dereference in WoL setup

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-10-20 14:02:05
Also in: linux-usb

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help