All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Zhilkin <csharper2005@gmail.com>
To: u-boot@lists.u-boot-project.org
Cc: jerome.forissier@arm.com, ryder.lee@mediatek.com,
	weijie.gao@mediatek.com, chunfeng.yun@mediatek.com,
	igor.belwon@mentallysanemainliners.org, dlechner@baylibre.com,
	jstephan@baylibre.com, GSS_MTK_Uboot_upstream@mediatek.com,
	trini@konsulko.com, Mikhail Zhilkin <csharper2005@gmail.com>
Subject: [PATCH v1 0/3] net: mtk_eth: an8855: fix packet loss and sync with Linux
Date: Sat,  7 Nov 2026 17:24:37 +0300	[thread overview]
Message-ID: <20261107142441.2104669-1-csharper2005@gmail.com> (raw)

This patch series aligns the U-Boot Airoha AN8855 switch initialization
code with the upstream Linux DSA driver
(drivers/net/dsa/airoha/an8855.c), fixing several register configuration
bugs and improving overall signal integrity.

The current default U-Boot configuration leaves the SerDes with marginal
drive characteristics. On some hardware iterations, this results in
severe packet loss (50-60%) and timeouts during TFTP recovery. This drop
occurs because of marginal signal integrity on the internal 2500Base-X
link connecting the switch to the CPU.

By correcting a bitwise shift overlap, enabling link error recovery, and
applying the proper TX FIR / RX CDR analog tuning parameters used in
Linux, this series ensures a stable physical link between the CPU and
switch across different boards.

These changes have been run-tested on the CMCC RAX3000ME and Xiaomi
AX3000T, both featuring the AN8855 switch, confirming stable network
operation and reliable gigabit TFTP recovery.

Patch summary:
- Patch 1 fixes a bitwise collision bug in the AN8855_RX_CTRL_8 register
  that was accidentally overwriting previously set bits.
- Patch 2 enables graceful link error recovery in AN8855_RX_CTRL_26
  instead of explicitly disabling it.
- Patch 3 ports the SerDes analog tuning parameters (TX Eye and RX
  Jitter Tolerance) from Linux, resolving the packet loss issue on the
  internal 2.5G CPU port.

Mikhail Zhilkin (3):
  net: mtk_eth: an8855: fix bitwise collision in RX_CTRL_8 register
  net: mtk_eth: an8855: enable link error recovery
  net: mtk_eth: an8855: sync SerDes analog tuning with Linux driver

 drivers/net/mtk_eth/an8855.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-11-07 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 14:24 Mikhail Zhilkin [this message]
2026-11-07 14:24 ` [PATCH v1 1/3] net: mtk_eth: an8855: fix bitwise collision in RX_CTRL_8 register Mikhail Zhilkin
2026-11-09 21:23   ` David Lechner
2026-11-07 14:24 ` [PATCH v1 2/3] net: mtk_eth: an8855: enable link error recovery Mikhail Zhilkin
2026-11-09 21:23   ` David Lechner
2026-11-07 14:24 ` [PATCH v1 3/3] net: mtk_eth: an8855: sync SerDes analog tuning with Linux driver Mikhail Zhilkin
2026-11-09 21:25   ` David Lechner
2026-11-09 21:23 ` [PATCH v1 0/3] net: mtk_eth: an8855: fix packet loss and sync with Linux David Lechner

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=20261107142441.2104669-1-csharper2005@gmail.com \
    --to=csharper2005@gmail.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=dlechner@baylibre.com \
    --cc=igor.belwon@mentallysanemainliners.org \
    --cc=jerome.forissier@arm.com \
    --cc=jstephan@baylibre.com \
    --cc=ryder.lee@mediatek.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=weijie.gao@mediatek.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.