mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Ziyang Huang <hzyitc@outlook.com>
Subject: Re: [RFC PATCH net-next v3 4/5] net: dsa: qca8k: flag QCA8337 internal CPU PHYs for SmartSpeed
Date: Fri, 25 Sep 2026 23:01:53 +0200	[thread overview]
Message-ID: <20260925210153.8717-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <d2797713-9b92-43c8-a26e-bf3bc9817ad8@lunn.ch>

Hi Andrew,

> But this is testing the wrong thing. This is testing downshift
> works. What you are actually interested in is downshift happening when
> it should not....
>
> So take a closer look at the user ports. phylib should report when a
> downshift occurs:

Thanks, that is a better test. I ran it on RA74 with the OpenWrt 6.18.52
backport that includes the read_status change, so phy_check_downshift()
sees the speed from 0x11. The user ports keep SmartSpeed at its hardware
default (enabled). The CPU PHY keeps the existing workaround, so
SmartSpeed stays disabled there.

Across 8 boots (1 after flashing, 4 warm reboots, 3 power cycles) and 10
"ethtool -r" on each of wan, lan1, lan2 and lan3, there was no
"Downshift occurred" message. CTRL1000 stayed at 0x0600 on all four user
PHYs, and each port came up at the speed its link partner supports. The
only unexpected event was one link drop on lan3 about 7 seconds after
its last renegotiation; it came back at 1 Gb/s after 3 seconds.

I also tried to recreate what the CPU link sees at boot, where the
IPQ5018 PHY does not advertise 1000BASE-T at first and adds it a few
seconds later. On lan1 I switched the PC NIC 30 times between
advertising only up to 100 Mb/s, with autonegotiation still enabled,
and full autonegotiation, then restarted it another 10 times. lan1
returned to 1 Gb/s every time. In 741 once-per-second samples CTRL1000
stayed at 0x0600 and 0x11 bit 5 was never set, and there was no
downshift warning.

So on this board I have not seen downshift misbehave on the user ports,
including when the link partner changes its advertisement in a similar
way. This is one board and a limited number of attempts, and the link
partner was a PC NIC rather than the IPQ5018 PHY. It also does not show
that downshift works on a bad cable, and the CPU link failure itself was
not exercised because SmartSpeed stays disabled on that PHY.

Disabling downshift for all qca83xx PHYs would also remove it from the
user ports, where I have not seen it misbehave. The CPU link has no
cable, only a fixed on-board connection, so disabling it there should
cost little. Given this, would you accept keeping the workaround limited
to the CPU link, or would you still prefer disabling it in the PHY
driver without a flag?

Thanks,
Yongzhao Chen

  reply	other threads:[~2026-09-25 21:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 21:58 [RFC PATCH net-next v3 0/5] net: dsa: qca8k: add a QCA8337 CPU PHY consumer Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 1/5] net: dsa: pass PHY flags when connecting shared ports Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 2/5] net: dsa: qca8k: serialize CPU MAC pause during MTU changes Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 3/5] net: dsa: qca8k: support QCA8337 internal PHY CPU links Yongzhao Chen
2026-09-23 21:58 ` [RFC PATCH net-next v3 4/5] net: dsa: qca8k: flag QCA8337 internal CPU PHYs for SmartSpeed Yongzhao Chen
2026-09-24  2:51   ` Andrew Lunn
2026-09-24 23:48     ` Yongzhao Chen
2026-09-25 15:17       ` Andrew Lunn
2026-09-25 21:01         ` Yongzhao Chen [this message]
2026-09-25 21:26           ` Andrew Lunn
2026-09-26  8:21             ` Yongzhao Chen
2026-09-26 13:11               ` Andrew Lunn
2026-09-23 21:58 ` [RFC PATCH net-next v3 5/5] net: phy: qca83xx: disable SmartSpeed before resetting CPU PHYs Yongzhao Chen

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=20260925210153.8717-1-yongzhao.derek@gmail.com \
    --to=yongzhao.derek@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=hzyitc@outlook.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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

all inboxes | Powered by JetHome®