]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: mediatek-ge-soc: follow netdev LED trigger semantics
authorDaniel Golle <daniel@makrotopia.org>
Sun, 21 Apr 2024 00:08:31 +0000 (01:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:37 +0000 (16:32 +0200)
commit2497bebf3110190c64677c4d4236577cb767bc7a
treef1dd1a4ef51c91da3594e343da0eb0c4b7d17fe6
parent2aacd4de45477582993f8a8abb9505a06426bfb6
net: phy: mediatek-ge-soc: follow netdev LED trigger semantics

[ Upstream commit 5b5f724b05c550e10693a53a81cadca901aefd16 ]

Only blink if the link is up on a LED which is programmed to also
indicate link-status.

Otherwise, if both LEDs are in use to indicate different speeds, the
resulting blinking being inverted on LEDs which aren't switched on at
a specific speed is quite counter-intuitive.

Also make sure that state left behind by reset or the bootloader is
recognized correctly including the half-duplex and full-duplex bits as
well as the (unsupported by Linux netdev trigger semantics) link-down
bit.

Fixes: c66937b0f8db ("net: phy: mediatek-ge-soc: support PHY LEDs")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/mediatek-ge-soc.c