All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	Bing tao Xu <bxu@maxlinear.com>,
	Juraj Povazanec <jpovazanec@maxlinear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
	"Livia M. Rosu" <lrosu@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next] net: phy: intel-xway: workaround stale LEDs before link-up
Date: Fri, 16 Jan 2026 02:06:43 +0000	[thread overview]
Message-ID: <aWmdMyJbzaoETETA@makrotopia.org> (raw)
In-Reply-To: <dd6ddb96-7aa9-4142-b991-5f27a4276a92@lunn.ch>

On Fri, Jan 16, 2026 at 02:23:18AM +0100, Andrew Lunn wrote:
> On Thu, Jan 15, 2026 at 11:40:38PM +0000, Daniel Golle wrote:
> > Due to a bug in some PHY internal firmware, manual control as well as
> > polarity configuration of the PHY LEDs has no effect until a link has
> > been detected at least once after reset. Apparently the LED control
> > thread is not started until then.
> > 
> > As a workaround, clear the BMCR_ANENABLE bit for 100ms to force the
> > firmware to start the LED thread, allowing manual LED control and
> > respecting LED polarity before the first link comes up.
> > 
> > In case the legacy default LED configuration is used the bug isn't
> > visible, so only apply the workaround in case LED configuration is
> > present in the device tree.
> 
> You should consider the case of forced links, where autoneg is
> disabled. Under such conditions, you should not leave autoneg enabled.

If BMCR_ANENABLE has already been disabled after a reset we can skip
this workaround entirely, as doing that once for more than 100ms is all
needed for the LEDs to work properly.

However, I'm not aware of .config_init ever being run again after the
intial attachment of the PHY and call to phy_init_hw().

All user-defined configuration happens after that, and would then remove
the BMCR_ANENABLE bit just like it would do it if it was set by the
hardware after reset.
(note that BMCR_ANENABLE is set as part of the reset value of BMCR on
this PHY)

But maybe I'm getting something wrong here?

  reply	other threads:[~2026-01-16  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 23:40 [PATCH net-next] net: phy: intel-xway: workaround stale LEDs before link-up Daniel Golle
2026-01-16  1:23 ` Andrew Lunn
2026-01-16  2:06   ` Daniel Golle [this message]
2026-01-18  2:29 ` [net-next] " Jakub Kicinski
2026-01-18  2:31   ` Jakub Kicinski
2026-01-18  2:33     ` Daniel Golle

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=aWmdMyJbzaoETETA@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=ajayaraman@maxlinear.com \
    --cc=andrew@lunn.ch \
    --cc=bxu@maxlinear.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fchan@maxlinear.com \
    --cc=hkallweit1@gmail.com \
    --cc=john@phrozen.org \
    --cc=jpovazanec@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lrosu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yweng@maxlinear.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.