From: Zhao Li <enderaoelyther@gmail.com>
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@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Eric Woudstra" <ericwouds@gmail.com>,
"Bjørn Mork" <bjorn@mork.no>,
"Lucien . Jheng" <lucienzx159@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: phy: air_en8811h: check PBUS register read errors
Date: Sat, 21 Nov 2026 20:27:58 +0800 [thread overview]
Message-ID: <20261121122758.7136-1-enderaoelyther@gmail.com> (raw)
In-Reply-To: <439bfedb-fc9f-4e41-a87d-f5e6a3b7950c@lunn.ch>
On Fri, Nov 20, 2026 at 02:15:00PM +0100, Andrew Lunn wrote:
> > /* We do not know what errors this check is supposed
> > * catch or what to do about a failure. So print the
> > * result and continue like the vendor driver does.
> > */
> > if (pbus_value & AN8811HB_CRC_ST) {
> > - air_phy_buckpbus_reg_read(phydev, mon3, &pbus_value);
> > + ret = air_phy_buckpbus_reg_read(phydev, mon3,
> > + &pbus_value);
> > + if (ret < 0)
> > + return ret;
>
> Please could you explain your understanding how this change and the
> comment go together? You did read the comment didn't you?
Yes, I did.
The failure mentioned in the comment is a firmware CRC mismatch
(AN8811HB_CRC_CHECK_PASS clear in mon3 once AN8811HB_CRC_ST is set in
mon2). That behavior is unchanged: when reading mon3 succeeds, a CRC
FAIL is only logged via phydev_dbg(), AN8811HB_CRC_RD_EN is cleared,
and firmware loading continues.
The added check handles a PBUS/MDIO register read failure instead. If
air_phy_buckpbus_reg_read() returns an error, pbus_value is not updated
and still holds the mon2 status word, so phydev_dbg() would report PASS
or FAIL decoded from the wrong register.
an8811hb_check_crc() already propagates PBUS errors from the
air_phy_buckpbus_reg_modify() calls at the start and end of the check
(and returns -ENODEV on timeout), so propagating errors from the three
PBUS reads in between keeps bus-error handling consistent.
If the comment now looks misleading right above the mon3 read check, I
can move it down above phydev_dbg() in a v3.
Thanks,
Zhao
prev parent reply other threads:[~2026-11-21 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 6:20 [PATCH net-next v2] net: phy: air_en8811h: check PBUS register read errors Zhao Li
2026-11-20 13:15 ` Andrew Lunn
2026-11-21 12:27 ` Zhao Li [this message]
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=20261121122758.7136-1-enderaoelyther@gmail.com \
--to=enderaoelyther@gmail.com \
--cc=andrew@lunn.ch \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=ericwouds@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lucienzx159@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