From mboxrd@z Thu Jan 1 00:00:00 1970 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 A9E7640DFB4; Mon, 30 Mar 2026 13:30:30 +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=1774877432; cv=none; b=jFGwfJj+5ZtEvZ0IbTN6TxOwf3R5AjQTOyign0pyenS7ftmA78E8xOPrwalET8+BXoAcZFx1EKT44o+5yApEEb2438rdBoBJ++1Td3TwfmeyH9oQLotAaIIdbIcSYitPkKAmZBvNAPEFV1MT6BrvGZtQ3oUfZD2iMaa4p6EQpgQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774877432; c=relaxed/simple; bh=I53+4x8QLsRQYCUgrpPnllpmhk7T0pUCk75VG9OJeKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z81XtMksq3vHphevr78q3pdaKlYN904QmfSDdqGrWhi1sR2bD5BzGEe3B2EhGGoSDX6QIdpKaL37aIg8/ovOktyw2LgmOjb7qLbaUfXtEZbPr96VBVwqlRPNyx4ESXhm7ubTCHMUzjf6qv+WnCdVfOUu4Iajpdx/KehjYFBzzTk= 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=Bv0zOFWx; 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="Bv0zOFWx" Received: from localhost (localhost [127.0.0.1]) by szelinsky.de (Postfix) with ESMTP id 84596E838DF; Mon, 30 Mar 2026 15:30:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szelinsky.de; s=mail; t=1774877427; 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=JnZMBJsLnU7PkgxfK7Y/dVM7d0dGIFtqowGcQ6qE3Ws=; b=Bv0zOFWx0KArdynhA602lO1md03zYfV44BWf2LGrFXpO4KQStsyQgPXv/A0Z3ftKxjaUbC oIAmaaKxAvp+RuZRHBAdSPT7gNv++50QQ9ASd9SAhvXlsD/KkXYbA0QSVISspEfF/N6zaw PcriUxTCx9B82S+z7dsMpHcagKgksgEfdqd52HwcSyDa0MV+ufhh9+QuzfktTkv7l7YUUr xZKAobmgZGkzFGxjbu+GZfPwSZwes8fMDC9Nfm/Bh0r0lgT1PJ/9IzV91L5YF+b6ix8Cm0 UiV14JqqkWy+wTKJFE6vVzDeXu8AkZFMfdIHXngL3eQugwjcbNZ+T8mbWfZGjQ== 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 oho3NqL8rmRx; Mon, 30 Mar 2026 15:30:27 +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; Mon, 30 Mar 2026 15:30:27 +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 net-next v2 0/3] net: pse-pd: support module-based PSE controller drivers Date: Mon, 30 Mar 2026 15:29:49 +0200 Message-ID: <20260330132952.2950531-1-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: 8bit 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 of_pse_control_get() to return -EPROBE_DEFER, destroying the PHY device. Later, regulator_late_cleanup disables the unclaimed PSE regulators, permanently killing PoE. This series fixes the issue in three steps: 1. Add an admin_state_synced flag to pse_pi so that pse_pi_is_enabled() reports unclaimed PIs as disabled, preventing regulator_late_cleanup from shutting them down. The existing dual-path behavior (software- tracked vs. hardware-queried state) is preserved for claimed PIs. 2. Add pse_control_try_resolve() for lazy PSE control resolution on first ethtool access, serialized by RTNL. 3. Treat -EPROBE_DEFER as non-fatal during PHY registration, allowing the PHY to register with psec=NULL. This is ordered last because it changes probe behavior and relies on patches 1 and 2 for correct lazy resolution. Thanks to Kory Maincent for the review and feedback on v1. Changes in v2: - Reordered patches: moved the EPROBE_DEFER patch last since it changes probe behavior and depends on the other two patches for correct lazy resolution (Kory Maincent) - Added net-next to subject prefix (Kory Maincent) - Collected Acked-by tags Carlo Szelinsky (3): net: pse-pd: prevent regulator cleanup from disabling unclaimed PSE PIs net: pse-pd: add lazy PSE control resolution for modular drivers net: mdio: treat PSE EPROBE_DEFER as non-fatal during PHY registration drivers/net/mdio/fwnode_mdio.c | 8 ++++-- drivers/net/pse-pd/pse_core.c | 49 ++++++++++++++++++++++++++++++++++ include/linux/pse-pd/pse.h | 6 +++++ net/ethtool/pse-pd.c | 4 +++ 4 files changed, 65 insertions(+), 2 deletions(-) base-commit: cf0d9080c6f795bc6be08babbffa29b62c06e9b0 -- 2.43.0