From nobody Thu Apr 2 10:44:11 2026 Received: from szelinsky.de (szelinsky.de [85.214.127.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE72D3803DD; Sun, 29 Mar 2026 16:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.127.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800643; cv=none; b=dJ5ri08+w0v60Sab2KYz73z1y4TXHHFU3k8yQj3ZNJ21D5fkSz9TKUN4cC+rmBw+JIrZI9rnlENWXpQizUi6o/V3pH3jd1fuIQUCWGQLg3uLlfNcyj0nXTBnxqdA17Qt2m2sq7RwIjKGh4Oq2+m7mFjKkdo8KhqIZYauk3jDsW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800643; c=relaxed/simple; bh=q/bWozPvpjS3129sQ1aT6MCNM/+CB287UXZCclsrAiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bvlRROCGS8MVr6Ay1pBtpANVhw1f9UMaU7A2Q5aMrqi130wxiC1u7eq5D+oN7MF9n1T0w11YVuTvk4EHaL7JBQpyV8xPM1SRsY+6uYxcAGieUMK7oa5K6DeH1ckg3A4ujbCEOBIPDT2GpWb86bdCL51tPAqKODOq2yqtzW8f0TE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de; spf=pass smtp.mailfrom=szelinsky.de; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b=eYJ6ou5Y; arc=none smtp.client-ip=85.214.127.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b="eYJ6ou5Y" Received: from localhost (localhost [127.0.0.1]) by szelinsky.de (Postfix) with ESMTP id 2038EE86F82; Sun, 29 Mar 2026 18:10:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szelinsky.de; s=mail; t=1774800640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OX2jiAI6SxjZvU8BVrCpRDDPGBmGKx9O4aTJ81TZaPs=; b=eYJ6ou5YxFaF7NJrr+D0dQg0jcWxxDsXle6FvgOsdoI+2Z2PjgPZMvPi3vTOwRyn7flogJ 7We6W8t4knYJ6WpGKbbV6Zw5lzpbHbkehk2rpWse27Iu4K+tLIvcOhr5onkONfjSmvJV4O eqNxnD3P+sXPIWhZ6R2/pnxSS84vzV/rbVgB9D2uIb+ax8JZO3YT2f47jLG8+m82NDxA/x NEEFishcyQ206By6qzxPLJriUi5PXl56dZ3PVNrwCmxhhKFWmjmQecHATnjbXAO3Bv5oBx gYiEPmw0dfiaPiFCHRDC6UyFux0sGyPXZow/3BcQN6cC2YFD3/xAwA8Mhh3MpQ== X-Virus-Scanned: Debian amavisd-new at szelinsky.de Received: from szelinsky.de ([127.0.0.1]) by localhost (szelinsky.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id DJpmlPOCNOeE; Sun, 29 Mar 2026 18:10:40 +0200 (CEST) Received: from p14sgen5.fritz.box (dslb-002-205-089-102.002.205.pools.vodafone-ip.de [2.205.89.102]) by szelinsky.de (Postfix) with ESMTPSA; Sun, 29 Mar 2026 18:10:39 +0200 (CEST) From: Carlo Szelinsky To: Kory Maincent , Oleksij Rempel , Andrew Lunn Cc: Heiner Kallweit , Russell King , Jakub Kicinski , "David S . Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Carlo Szelinsky Subject: [PATCH 1/3] net: mdio: treat PSE EPROBE_DEFER as non-fatal during PHY registration Date: Sun, 29 Mar 2026 18:10:12 +0200 Message-ID: <20260329161014.2908509-2-github@szelinsky.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260329161014.2908509-1-github@szelinsky.de> References: <20260329161014.2908509-1-github@szelinsky.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When a PSE controller driver is built as a module, it may not be probed yet when PHYs are registered on the MDIO bus. This causes fwnode_find_pse_control() -> of_pse_control_get() to return -EPROBE_DEFER, which currently propagates up and destroys the PHY device. Treat -EPROBE_DEFER as non-fatal, allowing the PHY to register successfully with psec=3DNULL. The PSE control can be resolved lazily when first needed. Signed-off-by: Carlo Szelinsky Acked-by: Kory Maincent --- drivers/net/mdio/fwnode_mdio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c index ba7091518265..2a03b3fc41e6 100644 --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c @@ -161,8 +161,12 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, =20 psec =3D fwnode_find_pse_control(child, phy); if (IS_ERR(psec)) { - rc =3D PTR_ERR(psec); - goto unregister_phy; + if (PTR_ERR(psec) =3D=3D -EPROBE_DEFER) { + psec =3D NULL; + } else { + rc =3D PTR_ERR(psec); + goto unregister_phy; + } } =20 phy->psec =3D psec; --=20 2.43.0 From nobody Thu Apr 2 10:44:11 2026 Received: from szelinsky.de (szelinsky.de [85.214.127.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84FA73803F1; Sun, 29 Mar 2026 16:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.127.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800645; cv=none; b=s79g3KjPKOCqAyqvct3QbERImoavmPuDNmihVnM9cCHYkjwAE5oJapALQMFL4OlRA/hhgLSq3GuXK+qhXI7Bjk0XO8HImfuMSxre3kcucRQAwhyv8l6APDairpJFRsJ7Jlp0m5VQTCUBQmTM9ekUAU43gtdxXbLaJLuINKA3uI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800645; c=relaxed/simple; bh=FjPBmb7sbxh3je9T4zb4X3mtCrGESVIQyoIpNQcSEk0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f//1uP10LFPoKycC5PcbBd3O9L3ay0tg0APW1XaW7WJURMDUSTOcls6pJ7E0O77moiU26LiirR12uDFULf8yTekpzl1VfJ0euewWUbjr+IVfTcOhgD2KjUECXRlvOxgdAvI3iMbGj0RmK8nusmOncKFME+mKERxmRNuWp+Xy+B8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de; spf=pass smtp.mailfrom=szelinsky.de; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b=W7oLiZk2; arc=none smtp.client-ip=85.214.127.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b="W7oLiZk2" Received: from localhost (localhost [127.0.0.1]) by szelinsky.de (Postfix) with ESMTP id EE378E83A8D; Sun, 29 Mar 2026 18:10:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szelinsky.de; s=mail; t=1774800641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=50/WO8MSecnkND79syf2COkGlyNU/ras3AKDpgbmDKA=; b=W7oLiZk2zdZ8QbaTC5VlyUwVwwBTs9YPnXYhxYJ/XAs+HqiZon9FCPQtRqo03i7FwCWVF2 xSKZbPTyEuL86e9WGpv3PNIp6fAknL/KQiFrNAxoZRdwwD3bFTGe5PPG08o5anTygjUc3L BQz6OC1cq4pVdOpg3fegcbb2TmL+bXugz2+Jzm/lWN0tPDXSmRNmZ5/xbb8DImUKgho+HW ko+A+5jkiYoOw0e2LtqASUiwLik+QYxOMISaBjnIKPB3pFfIM2jOfjE2PWjwBzwfKFcq9D rQ1C1HRTK/wfvVFKJofi/r+Ng4bQZC7WlDfeCetKF40nWFHFrnThLFeSftQbEw== X-Virus-Scanned: Debian amavisd-new at szelinsky.de Received: from szelinsky.de ([127.0.0.1]) by localhost (szelinsky.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id P1DlYMwhnskw; Sun, 29 Mar 2026 18:10:41 +0200 (CEST) Received: from p14sgen5.fritz.box (dslb-002-205-089-102.002.205.pools.vodafone-ip.de [2.205.89.102]) by szelinsky.de (Postfix) with ESMTPSA; Sun, 29 Mar 2026 18:10:41 +0200 (CEST) From: Carlo Szelinsky To: Kory Maincent , Oleksij Rempel , Andrew Lunn Cc: Heiner Kallweit , Russell King , Jakub Kicinski , "David S . Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Carlo Szelinsky Subject: [PATCH 2/3] net: pse-pd: prevent regulator cleanup from disabling unclaimed PSE PIs Date: Sun, 29 Mar 2026 18:10:13 +0200 Message-ID: <20260329161014.2908509-3-github@szelinsky.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260329161014.2908509-1-github@szelinsky.de> References: <20260329161014.2908509-1-github@szelinsky.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When a PSE controller driver is loaded as a module, its PI regulators are registered before any consumer (PHY) acquires the corresponding PSE control via of_pse_control_get(). The regulator framework's regulator_late_cleanup then calls pse_pi_is_enabled(), which queries hardware and sees the PI is enabled. Since no consumer holds it (use_count =3D=3D 0), regulator_late_cleanup disables it, killing PoE. Add an admin_state_synced flag to struct pse_pi that is set when a consumer first acquires the PSE control and syncs admin_state_enabled from hardware. In pse_pi_is_enabled(), report unsynchronized PIs as disabled so regulator_late_cleanup skips them. This preserves the existing dual-path behavior: software-tracked state for software-controlled power domains, and hardware queries for hardware-controlled domains. The admin_state_synced flag is only false before the first consumer acquisition, which is the exact window where regulator_late_cleanup could incorrectly disable the PI. Signed-off-by: Carlo Szelinsky Acked-by: Kory Maincent --- drivers/net/pse-pd/pse_core.c | 13 +++++++++++++ include/linux/pse-pd/pse.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c index 3beaaaeec9e1..566b07c336bf 100644 --- a/drivers/net/pse-pd/pse_core.c +++ b/drivers/net/pse-pd/pse_core.c @@ -421,6 +421,18 @@ static int pse_pi_is_enabled(struct regulator_dev *rde= v) =20 id =3D rdev_get_id(rdev); mutex_lock(&pcdev->lock); + + /* + * Report the PI as disabled until a consumer has acquired it + * and synced admin_state_enabled from hardware. This prevents + * regulator_late_cleanup from disabling unclaimed PSE PIs + * when the PSE controller driver loads as a module. + */ + if (!pcdev->pi[id].admin_state_synced) { + ret =3D 0; + goto out; + } + if (pse_pw_d_is_sw_pw_control(pcdev, pcdev->pi[id].pw_d)) { ret =3D pcdev->pi[id].admin_state_enabled; goto out; @@ -1431,6 +1443,7 @@ pse_control_get_internal(struct pse_controller_dev *p= cdev, unsigned int index, goto free_psec; =20 pcdev->pi[index].admin_state_enabled =3D ret; + pcdev->pi[index].admin_state_synced =3D true; psec->ps =3D devm_regulator_get_exclusive(pcdev->dev, rdev_get_name(pcdev->pi[index].rdev)); if (IS_ERR(psec->ps)) { diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h index 4e5696cfade7..b86cce740551 100644 --- a/include/linux/pse-pd/pse.h +++ b/include/linux/pse-pd/pse.h @@ -260,6 +260,7 @@ struct pse_pi { struct device_node *np; struct regulator_dev *rdev; bool admin_state_enabled; + bool admin_state_synced; struct pse_power_domain *pw_d; int prio; bool isr_pd_detected; --=20 2.43.0 From nobody Thu Apr 2 10:44:11 2026 Received: from szelinsky.de (szelinsky.de [85.214.127.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D7D337FF44; Sun, 29 Mar 2026 16:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.127.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800646; cv=none; b=Sidg0PCOH17COOxJR4obCLfdaPHNe9ypV4HDdPEFVJJRoHAb5zyZQaktdyNTt4Tk214anS0+1lZGKYqivN9CqHBw1XvQzLcR70UJn+RtqmNsqOIlay754MLm5NhTLBcccb3jRvRQaxlkXrn+Ss9u+EMtBDNcADhsaxuYmFnjj9s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774800646; c=relaxed/simple; bh=P6/A+JOlCoDetx/0/ysYfOC310WI84Hdv3H9eqMMQxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nr4ISUJiDpRvDhURq1hzkTLJ4Tdt/rOhg/EHMPjlFz6Rr41WzuCPjFjxvnmoQXp2VsWDVmLce34QQ/sJr/p8Scbsbc4ZA3Sw8LPco+Y8YO1I+BpX1foBJmNeO/RGL4b95wSHtJJF8CpbO9iUD5bNCo4X+KRAtCiUqpH763mGty4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de; spf=pass smtp.mailfrom=szelinsky.de; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b=TPcrDiR3; arc=none smtp.client-ip=85.214.127.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szelinsky.de Authentication-Results: smtp.subspace.kernel.org; dkim=temperror (0-bit key) header.d=szelinsky.de header.i=@szelinsky.de header.b="TPcrDiR3" Received: from localhost (localhost [127.0.0.1]) by szelinsky.de (Postfix) with ESMTP id 98596E86F82; Sun, 29 Mar 2026 18:10:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szelinsky.de; s=mail; t=1774800643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VhlormB9e1plGDlmX2H/AurXlOK0vzu1Zr6fCmM0GGQ=; b=TPcrDiR3Tw8Agak2JW62h84sxYQ65/Q2PILpCIZeB4NAu2/Hhby9o6PjG/03zbj7y84SLs OJCNAuA5iwtO39jsBdFlCB6/jg0m8hnxPbzrqDQ2TeD/fUcv+o0HcD62XJnTUUtmpi5B9p bEPsAR8Se6dUVrRvL+qyBTypslM2HrCAQX6Tv8ogw/BGb/vvhWMkMeoNQokzk3j3DhO6ek xRShXJ3vMheEe3sCX6FBBxT9D/NwpU7oPgLI0p6UnPiHo2uUfQAS9RT51HKcJjBdimGFFQ 7h2ocyhKtczAsBVF3gij/9LBYkKQeCn31lhZWEJJv+AZ/uxw95vihyun9zgj9A== X-Virus-Scanned: Debian amavisd-new at szelinsky.de Received: from szelinsky.de ([127.0.0.1]) by localhost (szelinsky.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id k4jk6b3rSXDt; Sun, 29 Mar 2026 18:10:43 +0200 (CEST) Received: from p14sgen5.fritz.box (dslb-002-205-089-102.002.205.pools.vodafone-ip.de [2.205.89.102]) by szelinsky.de (Postfix) with ESMTPSA; Sun, 29 Mar 2026 18:10:43 +0200 (CEST) From: Carlo Szelinsky To: Kory Maincent , Oleksij Rempel , Andrew Lunn Cc: Heiner Kallweit , Russell King , Jakub Kicinski , "David S . Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Carlo Szelinsky Subject: [PATCH 3/3] net: pse-pd: add lazy PSE control resolution for modular drivers Date: Sun, 29 Mar 2026 18:10:14 +0200 Message-ID: <20260329161014.2908509-4-github@szelinsky.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260329161014.2908509-1-github@szelinsky.de> References: <20260329161014.2908509-1-github@szelinsky.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When a PSE controller driver is built as a module and was not probed during PHY registration, the PHY ends up with psec=3DNULL. Add pse_control_try_resolve() to lazily resolve the PSE control on first ethtool access. Call pse_control_try_resolve() in both the GET and SET ethtool PSE handlers, before checking phydev->psec. The function is serialized by RTNL (enforced via ASSERT_RTNL), preventing concurrent callers from double-allocating a PSE control. If resolution fails (e.g. the module still has not loaded), a debug message is emitted via phydev_dbg() and the handler falls through to the existing "No PSE is attached" error path. Signed-off-by: Carlo Szelinsky Acked-by: Kory Maincent --- drivers/net/pse-pd/pse_core.c | 36 +++++++++++++++++++++++++++++++++++ include/linux/pse-pd/pse.h | 5 +++++ net/ethtool/pse-pd.c | 4 ++++ 3 files changed, 45 insertions(+) diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c index 566b07c336bf..390df23a991c 100644 --- a/drivers/net/pse-pd/pse_core.c +++ b/drivers/net/pse-pd/pse_core.c @@ -1569,6 +1569,42 @@ struct pse_control *of_pse_control_get(struct device= _node *node, } EXPORT_SYMBOL_GPL(of_pse_control_get); =20 +/** + * pse_control_try_resolve - attempt to resolve a deferred PSE control + * @phydev: the PHY device whose PSE control may need resolution + * + * When a PSE controller driver is built as a module, it may not have + * probed when PHYs were registered on the MDIO bus. This function + * retries PSE control acquisition and should be called before + * accessing phydev->psec in ethtool handlers. + * + * Context: Caller must hold RTNL. + */ +void pse_control_try_resolve(struct phy_device *phydev) +{ + struct device_node *np; + struct pse_control *psec; + + ASSERT_RTNL(); + + if (phydev->psec) + return; + + np =3D phydev->mdio.dev.of_node; + if (!np || !of_property_present(np, "pses")) + return; + + psec =3D of_pse_control_get(np, phydev); + if (IS_ERR(psec)) { + phydev_dbg(phydev, "failed to resolve PSE control: %pe\n", + psec); + return; + } + + phydev->psec =3D psec; +} +EXPORT_SYMBOL_GPL(pse_control_try_resolve); + /** * pse_get_sw_admin_state - Convert the software admin state to c33 or podl * admin state value used in the standard diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h index b86cce740551..d2f9b7c1acdf 100644 --- a/include/linux/pse-pd/pse.h +++ b/include/linux/pse-pd/pse.h @@ -350,6 +350,7 @@ int devm_pse_irq_helper(struct pse_controller_dev *pcde= v, int irq, struct pse_control *of_pse_control_get(struct device_node *node, struct phy_device *phydev); void pse_control_put(struct pse_control *psec); +void pse_control_try_resolve(struct phy_device *phydev); =20 int pse_ethtool_get_status(struct pse_control *psec, struct netlink_ext_ack *extack, @@ -379,6 +380,10 @@ static inline void pse_control_put(struct pse_control = *psec) { } =20 +static inline void pse_control_try_resolve(struct phy_device *phydev) +{ +} + static inline int pse_ethtool_get_status(struct pse_control *psec, struct netlink_ext_ack *extack, struct ethtool_pse_control_status *status) diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c index 2eb9bdc2dcb9..adffc230acd6 100644 --- a/net/ethtool/pse-pd.c +++ b/net/ethtool/pse-pd.c @@ -42,6 +42,8 @@ static int pse_get_pse_attributes(struct phy_device *phyd= ev, return -EOPNOTSUPP; } =20 + pse_control_try_resolve(phydev); + if (!phydev->psec) { NL_SET_ERR_MSG(extack, "No PSE is attached"); return -EOPNOTSUPP; @@ -249,6 +251,8 @@ ethnl_set_pse_validate(struct phy_device *phydev, struc= t genl_info *info) return -EOPNOTSUPP; } =20 + pse_control_try_resolve(phydev); + if (!phydev->psec) { NL_SET_ERR_MSG(info->extack, "No PSE is attached"); return -EOPNOTSUPP; --=20 2.43.0