Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ahmed Naseef <naseefkm@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Daniel Golle <daniel@makrotopia.org>,
	Eric Dumazet <edumazet@google.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>, Qingfang Deng <dqfext@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	SkyLake Huang <SkyLake.Huang@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net] net: phy: mediatek: fix TX blink masks using the RX bits
Date: Tue, 4 Aug 2026 21:26:15 +0200	[thread overview]
Message-ID: <a12116a7-a25c-4048-9558-9171550d72f2@lunn.ch> (raw)
In-Reply-To: <anIwRrQT9qMD89v5@DESKTOP-TIT0J8O.localdomain>

On Tue, Aug 04, 2026 at 10:32:38PM +0400, Ahmed Naseef wrote:
> On Tue, Aug 04, 2026 at 08:11:21PM +0200, Andrew Lunn wrote:
> > 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.
> 
> It was introduced by that commit. Before it, mtk-ge-soc.c correctly had:
> 
>   #define   MTK_PHY_LED_BLINK_TX      (MTK_PHY_LED_BLINK_10TX |\
>                                        MTK_PHY_LED_BLINK_100TX |\
>                                        MTK_PHY_LED_BLINK_1000TX)

Thanks for checking.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew


  reply	other threads:[~2026-08-04 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 11:35 [PATCH net] net: phy: mediatek: fix TX blink masks using the RX bits Ahmed Naseef
2026-08-04 18:11 ` Andrew Lunn
2026-08-04 18:32   ` Ahmed Naseef
2026-08-04 19:26     ` Andrew Lunn [this message]
2026-08-06 13:00 ` 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=a12116a7-a25c-4048-9558-9171550d72f2@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=SkyLake.Huang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=naseefkm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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