Hi,
> Fixes: 355b82c54c12 ("net: phy: motorcomm: Add support for PHY LEDs on YT8521")
>
> Should that tag be added?
> Adding a Fixes: tag would also mark the LINK plus LINK_xxx issue below
> for stable backport. It may be worth resolving that issue first.
No, its absence will not cause an error. So there's no need for a backport.
> The code just above still sets TRIGGER_NETDEV_LINK_10, LINK_100 and
> LINK_1000 for each enabled speed bit. When all three bits are set, the
> returned rules become LINK | LINK_10 | LINK_100 | LINK_1000.
>
> Does ledtrig-netdev accept that combination?
This cannot happen. 'link' and 'link_xx' cannot both be set.
> A bootloader or hardware default with all three bits set would read
> back the same way.
Write to the register to simulate this state:
# mdio xxx phy 1 raw 0x1e 0xa00d
# mdio xxx phy 1 raw 0x1f 0x70
> Once the netdev trigger is active on such an LED, wouldn't these writes
> all fail with -EINVAL?
>
> echo 1 > tx
> echo 0 > rx
> echo 0 > full_duplex
> echo 0 > link_100
> echo 1 > link
These commands all succeeded.
# mdio xxx phy 1 raw 0x1f
0x2470
> Only "echo 0 > link" would succeed. Sysfs would also show link=1 together
> with link_10, link_100 and link_1000 set to 1. The store path itself
> never allows that state.
So this problem will not occur.