Re: [PATCH net-next 6/9] net: dsa: microchip: implement .{get/set}_wol only if needed
From: Bastien Curutchet
Date: Tue Jun 02 2026 - 08:41:58 EST
Hi Paolo,
On 6/1/26 10:59 AM, Paolo Abeni wrote:
On 5/26/26 11:47 AM, Bastien Curutchet (Schneider Electric) wrote:
@@ -3798,9 +3795,6 @@ int ksz_set_wol(struct dsa_switch *ds, int port,
if (wol->wolopts & ~(WAKE_PHY | WAKE_MAGIC))
return -EINVAL;
- if (!is_ksz9477(dev) && !ksz_is_ksz87xx(dev))
- return -EOPNOTSUPP;
Sashiko noted there is still a ksz_is_ksz87xx(dev) check in
ksz_wol_pre_shutdown() which would probably keep WoL broken for the
newly enabled switches.
Good catch from Sashiko here. I'm going to replace the is_ksz() checks in ksz_wol_pre_shutdown() with a if (ds->ops->get_wol && ds->ops->set_wol) (as done here in ksz_port_set_mac_address()) to ensure consistency in the WoL handling.
Best regards,
Bastien