From: sashiko-bot@kernel.org
To: "Joris Vaisvila" <joey@tinyisr.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v4 2/4] net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYs
Date: Tue, 09 Jun 2026 19:31:05 +0000 [thread overview]
Message-ID: <20260609193106.1BCF51F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260608192948.289745-3-joey@tinyisr.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Register overwrite due to unconditional write instead of read-modify-write.
--
commit c56d71446569801055eeaf712bd2739d4e88d605
Author: Joris Vaisvila <joey@tinyisr.com>
net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYs
This commit adds a new driver for MediaTek MT7628 built-in Fast Ethernet PHYs.
It configures the PHY to establish 100mbps links by setting an initialization
bit in an undocumented register.
> diff --git a/drivers/net/phy/mediatek/mtk-fe-soc.c b/drivers/net/phy/mediatek/mtk-fe-soc.c
> new file mode 100644
> index 0000000000000..317944411fbe7
> --- /dev/null
> +++ b/drivers/net/phy/mediatek/mtk-fe-soc.c
[ ... ]
> +static int mt7628_phy_config_init(struct phy_device *phydev)
> +{
> + /*
> + * This undocumented bit is required for the PHYs to be able to
> + * establish 100mbps links.
> + */
> + return phy_write_paged(phydev, 0x8000, 30, BIT(13));
[Severity: Medium]
The comment and commit message mention setting an initialization bit. Does
this unconditional write safely preserve the other bits in this register?
If other fields in this undocumented register are initialized by hardware
reset or the bootloader, writing 0x2000 will destructively clear them to 0.
Should this use a read-modify-write operation like phy_modify_paged()
instead, or is overwriting the entire register intentional?
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260608192948.289745-1-joey@tinyisr.com?part=2
next prev parent reply other threads:[~2026-06-09 19:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 19:29 [PATCH net-next v4 0/4] net: dsa: mt7628 embedded switch initial support Joris Vaisvila
2026-06-08 19:29 ` [PATCH net-next v4 1/4] dt-bindings: net: dsa: add MT7628 ESW Joris Vaisvila
2026-06-09 7:01 ` Krzysztof Kozlowski
2026-06-08 19:29 ` [PATCH net-next v4 2/4] net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYs Joris Vaisvila
2026-06-09 19:31 ` sashiko-bot [this message]
2026-06-08 19:29 ` [PATCH net-next v4 3/4] net: dsa: initial MT7628 tagging driver Joris Vaisvila
2026-06-08 19:29 ` [PATCH net-next v4 4/4] net: dsa: initial support for MT7628 embedded switch Joris Vaisvila
2026-06-09 19:31 ` sashiko-bot
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=20260609193106.1BCF51F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joey@tinyisr.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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