From: Yongzhao Chen <yongzhao.derek@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: qca83xx: read resolved QCA8337 link status
Date: Wed, 30 Sep 2026 23:23:47 +0200 [thread overview]
Message-ID: <20260930212348.1919-1-yongzhao.derek@gmail.com> (raw)
In-Reply-To: <01a62e77-6c4e-4665-ba46-26d12b1c77b4@lunn.ch>
Hi Andrew,
> If there is no link, genphy_read_status() will of already set these to
> _UNKNOWN etc. There is no need to clear them.
Right, thanks. In the next revision I have replaced the custom decoding
and state clearing with at803x_read_status(), followed by
genphy_read_master_slave() to keep the master/slave reporting from the
generic path.
> Can this really happen? BCMR says there is link, but this says there
> is no link? What does the data sheet say? It seems unlikely to me.
I have not observed it on hardware. The QCA8337 datasheet (80-Y0619-3
Rev. D, p. 328) describes the resolved bit and the speed/duplex fields
in register 0x11, and says speed/duplex are valid after autonegotiation
completes. I could not find anything there about the ordering of that
bit and the BMSR link status across separate reads. The unresolved case
in my test was synthetic input, not a state captured on hardware.
In that synthetic sequence, at803x_read_status() reports link up with
SPEED_UNKNOWN. If BMSR stays up when 0x11 later resolves, the speed
remains SPEED_UNKNOWN until the next link transition. So switching to
the helper does not by itself answer whether this state can occur on
real hardware. Is there a QCA8337-specific rule about when register 0x11
is updated relative to BMSR that I should check before deciding whether
this needs separate handling?
Separately, I have not yet reproduced on hardware the case this patch
targets, a QCA8337-side SmartSpeed downshift where the old code reports
the wrong speed; so far that difference is only shown by the model test.
With a two-pair cable, the link partner advertised gigabit and then
withdrew it, and the link came up at 100 Mb/s without the QCA8337
downshift status set.
If you know of a link partner or setup that reliably makes the QCA8337
side downshift, I would be glad to test with it.
Thanks,
Yongzhao Chen
next prev parent reply other threads:[~2026-09-30 21:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 22:07 Yongzhao Chen
2026-09-29 0:40 ` Andrew Lunn
2026-09-30 21:23 ` Yongzhao Chen [this message]
2026-09-30 21:33 ` Andrew Lunn
2026-10-01 18:16 ` Yongzhao Chen
2026-10-01 18:46 ` Andrew Lunn
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=20260930212348.1919-1-yongzhao.derek@gmail.com \
--to=yongzhao.derek@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.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=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®