From: netdev-bot+sashiko@kernel.org
To: florian.fainelli@broadcom.com
Cc: netdev@vger.kernel.org, nb@tipi-net.de,
bcm-kernel-feedback-list@broadcom.com, andrew@lunn.ch,
hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net-next v2 2/4] net: phy: broadcom: Implement cable test initialization for BCM54210E
Date: Sun, 06 Dec 2026 00:07:34 +0000 [thread overview]
Message-ID: <179651565415.3148.2665665190321774221@kernel.org> (raw)
In-Reply-To: <20261204233633.3790143-3-florian.fainelli@broadcom.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In _bcm_phy_load_values() (drivers/net/phy/bcm-phy-lib.c), two
comments say values are being restored, but the code only writes zeros.
--
net: phy: broadcom: Implement cable test initialization for BCM54210E
This commit loads vendor ECD parameters on the BCM54210E before a cable
test starts. It adds _bcm_phy_load_values() and
__bcm_phy_cable_test_init() to write the staging and paged expansion
registers. Only the BCM54210E model in _bcm_phy_cable_test_start() runs
this sequence.
> diff --git a/drivers/net/phy/bcm-phy-lib.c b/drivers/net/phy/bcm-phy-lib.c
> index 4911dc8210cdd..1a170faf05aef 100644
> --- a/drivers/net/phy/bcm-phy-lib.c
> +++ b/drivers/net/phy/bcm-phy-lib.c
> @@ -657,6 +657,156 @@ static int __bcm_phy_enable_legacy_access(struct phy_device *phydev)
[ ... ]
> +/* Load the ECD page and clear the staging registers afterwards.
> + * The enable mask requires regs[] to list consecutive offsets from 0xe0.
> + */
> +static int _bcm_phy_load_values(struct phy_device *phydev,
> + const struct __bcm_phy_regs *regs,
> + size_t num_regs,
> + u16 page_num)
> +{
[ ... ]
> + /* Write strobe 0 */
> + ret = __bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_SEL_ER + 0xcd, 0);
> + if (ret < 0)
> + return ret;
> +
> + /* Restore expansion E* register values */
> + for (i = 0; i < num_regs; i++) {
> + ret = __bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_SEL_ER +
> + regs[i].reg, 0);
> + if (ret < 0)
> + return ret;
> + }
> +
> + /* And restore 0xEF register */
> + return __bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_SEL_ER + 0xef, 0);
> +}
[Severity: Low]
This isn't a bug, but should these two comments say "clear" instead of
"restore"?
Nothing in _bcm_phy_load_values() reads or saves the earlier contents
of the E* staging registers or of MII_BCM54XX_EXP_SEL_ER + 0xef. Both
blocks just write 0 to them.
The header comment above the function says "clear the staging registers
afterwards", which matches what the code does. The two comments in the
body say the old values are restored, which contradicts the header.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204233633.3790143-1-florian.fainelli%40broadcom.com
next prev parent reply other threads:[~2026-12-06 0:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 23:36 [PATCH net-next v2 0/4] net: phy: Cable tests for BCM54210E Florian Fainelli
2026-12-04 23:36 ` [PATCH net-next v2 1/4] net: phy: broadcom: Report failed ECD pairs as unspecified Florian Fainelli
2026-12-06 0:07 ` netdev-bot+sashiko
2026-12-04 23:36 ` [PATCH net-next v2 2/4] net: phy: broadcom: Implement cable test initialization for BCM54210E Florian Fainelli
2026-12-06 0:07 ` netdev-bot+sashiko [this message]
2026-12-04 23:36 ` [PATCH net-next v2 3/4] net: phy: broadcom: Wire-up cable tests " Florian Fainelli
2026-12-06 0:07 ` netdev-bot+sashiko
2026-12-04 23:36 ` [PATCH net-next v2 4/4] net: phy: broadcom: Recover BCM54210E from aborted cable tests Florian Fainelli
2026-12-06 0:07 ` netdev-bot+sashiko
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=179651565415.3148.2665665190321774221@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nb@tipi-net.de \
--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 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.