From: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
To: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: linux@armlinux.org.uk, daniel@makrotopia.org,
o.rempel@pengutronix.de, netdev@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
donggeunyoo.kernel@gmail.com, stable@vger.kernel.org
Subject: [PATCH net v3 2/3] net: phy: dp83td510: handle the active-high LED polarity mode
Date: Tue, 8 Sep 2026 19:59:58 +0900 [thread overview]
Message-ID: <20260908105959.70453-3-donggeunyoo.kernel@gmail.com> (raw)
In-Reply-To: <20260908105959.70453-1-donggeunyoo.kernel@gmail.com>
dp83td510_led_polarity_set() only recognizes PHY_LED_ACTIVE_LOW, so
PHY_LED_ACTIVE_HIGH falls through to the default case and returns -EINVAL.
of_phy_led() propagates the error, of_phy_leds() drops the LEDs registered
so far and passes it on, and phy_probe() returns it. A device tree marking
a DP83TD510 LED as 'active-high', which leds/common.yaml allows and
ethernet-phy.yaml references for led@N nodes, thus leaves the mdio device
unbound, so phy_attach_direct() falls back to the genphy driver, which
cannot drive this 10BASE-T1L single-mode PHY, so the interface has no
usable link.
The callback initializes polarity to DP83TD510E_LED_POLARITY(index), which
is the active-high setting, so the request is already satisfied and only
the case label is missing.
Cc: stable@vger.kernel.org
Fixes: 5b281fe7e396 ("net: phy: dp83td510: introduce LED framework support")
Assisted-by: Claude:claude-fable-5
Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com>
---
drivers/net/phy/dp83td510.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/phy/dp83td510.c b/drivers/net/phy/dp83td510.c
index d75dae6071ad..9e9a41bf6457 100644
--- a/drivers/net/phy/dp83td510.c
+++ b/drivers/net/phy/dp83td510.c
@@ -439,6 +439,9 @@ static int dp83td510_led_polarity_set(struct phy_device *phydev, int index,
case PHY_LED_ACTIVE_LOW:
polarity = 0;
break;
+ case PHY_LED_ACTIVE_HIGH:
+ polarity = DP83TD510E_LED_POLARITY(index);
+ break;
default:
return -EINVAL;
}
--
2.53.0
next prev parent reply other threads:[~2026-09-08 11:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 10:59 [PATCH net v3 0/3] net: phy: " Donggeun Yoo
2026-09-08 10:59 ` [PATCH net v3 1/3] net: phy: dp83867: " Donggeun Yoo
2026-09-08 14:02 ` Andrew Lunn
2026-09-08 10:59 ` Donggeun Yoo [this message]
2026-09-08 14:06 ` [PATCH net v3 2/3] net: phy: dp83td510: " Andrew Lunn
2026-09-08 10:59 ` [PATCH net v3 3/3] net: phy: qca808x: " Donggeun Yoo
2026-09-08 14:09 ` Andrew Lunn
2026-09-09 23:02 ` netdev-bot+sashiko
2026-09-10 15:20 ` [PATCH net v3 0/3] net: phy: " patchwork-bot+netdevbpf
2026-09-10 15:50 ` patchwork-bot+netdevbpf
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=20260908105959.70453-3-donggeunyoo.kernel@gmail.com \
--to=donggeunyoo.kernel@gmail.com \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®