Re: [PATCH net] net: phy: mediatek: fix TX blink masks using the RX bits

Andrew Lunn <[email protected]> Tue, 4 Aug 2026 20:11:21 +0200
Newsgroups gmane.linux.kernel,gmane.linux.network,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.mediatek
Message-ID <[email protected]>
On Tue, Aug 04, 2026 at 03:35:11PM +0400, Ahmed Naseef wrote:
> MTK_GPHY_LED_TX_BLINK_SET and MTK_2P5GPHY_LED_TX_BLINK_SET are built
> from the RX blink bits instead of the TX ones, so both TX masks are
> identical to their RX counterparts. The TX bits they should be using,
> MTK_PHY_LED_BLINK_{10,100,1000,2500}TX, are otherwise only referenced
> by the per-speed branch of mtk_phy_led_hw_ctrl_set().
> 
> A TX trigger selected without a link trigger therefore programs the RX
> blink bits, and the LED blinks on received traffic. The masks are also
> used to decode the blink register in mtk_phy_led_hw_ctrl_get(), which
> as a result cannot tell the two triggers apart: an RX-only
> configuration reads back as RX and TX, and a TX-only configuration
> reads back as neither.
> 
> Fixes: 7f9c320c98db ("net: phy: mediatek: Move LED helper functions into mtk phy lib")

Was this bug introduced in this commit, or did this commit just move
the code around and it was broken before? The Fixes should go back to
where the bug was added, which could be earlier.

	Andrew