]> git.itanic.dy.fi Git - linux-stable/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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2024 10:50:49 +0000 (11:50 +0100)
commit5b5f724b05c550e10693a53a81cadca901aefd16
tree7ff0ede1387aa9e21931e6e762dd48fdec6c2271
parentf2a904107ee2b647bb7794a1a82b67740d7c8a64
net: phy: mediatek-ge-soc: follow netdev LED trigger semantics

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>
drivers/net/phy/mediatek-ge-soc.c