From: Javen <javen_xu@realsil.com.cn>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"nb@tipi-net.de" <nb@tipi-net.de>,
"maxime.chevallier@bootlin.com" <maxime.chevallier@bootlin.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"daniel@makrotopia.org" <daniel@makrotopia.org>,
"vladimir.oltean@nxp.com" <vladimir.oltean@nxp.com>
Subject: RE: [PATCH net-next v5 2/4] r8169: hold MDIO bus lock while loading firmware
Date: Thu, 3 Dec 2026 03:04:56 +0000 [thread overview]
Message-ID: <442df8997b3e455894e44c59418822b6@realsil.com.cn> (raw)
In-Reply-To: <95978163-95dc-4958-a0b3-0885674daea5@lunn.ch>
>
>> I agree. But most of Realtek nics are single chip, mac and phy are
>> highly integrated. Some of the chips share the same PHY ID, but they
>> have different mac version which should be applied different firmware.
>> In this case, I think firmware here can not be moved into PHY driver
>> for the bad design.
>
>We have dealt with bad vendor design before, where ID 2 and 3 are not
>sufficient, or not even filled in.
>
>Look at the Marvell mv88e6xxx switch driver. Some generations of its
>integrated PHYs have the OUI part, but the model is 0. The data sheet even
>says this was intentional!?!?. So the MDIO driver, which knows the switch ID,
>traps reads to ID2, and if it finds the ID value is not reasonable, it replaces it
>with the ID of the switch. The Marvell PHY driver then knows what sort of PHY
>it is dealing with.
>
>Please don't use bad design as an excuse for layering violations.
>
>If there are other design issues, just describe them, and we can figure out a
>workaround.
>
>But step by step you need to move all PHY code out of the MAC driver and into
>the PHY driver. And i will not accept any new code which touches PHY registers
>from the MAC driver.
>
Understand.
But for single chip, the firmware contains mixed configurations for both MAC and PHY. It has strict timing requirements. During execution, it uses PHY_MDIO_CHG to dynamically switch the access target. The sequence is interleaved and cannot be split to into two separated phases.
How do you suggest we handle this issue? Any suggestion will be helpful.
Thanks,
Javen
next prev parent reply other threads:[~2026-12-03 3:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:44 [PATCH net-next v5 0/4] net: phy: realtek: add PTP support for RTL8127a javen
2026-12-01 9:44 ` [PATCH net-next v5 1/4] net: ethtool: tsconfig: allow selecting a provider javen
2026-12-01 10:06 ` Nicolai Buchwitz
2026-12-01 10:34 ` Maxime Chevallier
2026-12-01 10:44 ` Nicolai Buchwitz
2026-12-01 9:44 ` [PATCH net-next v5 2/4] r8169: hold MDIO bus lock while loading firmware javen
2026-12-01 10:18 ` Nicolai Buchwitz
2026-12-02 13:17 ` Andrew Lunn
2026-12-03 2:07 ` Javen
2026-12-03 2:37 ` Andrew Lunn
2026-12-03 3:04 ` Javen [this message]
2026-12-01 9:44 ` [PATCH net-next v5 3/4] net: phy: realtek: add PTP clock support for RTL8127a javen
2026-12-01 10:23 ` Nicolai Buchwitz
2026-12-02 8:55 ` Javen
2026-12-02 12:20 ` Nicolai Buchwitz
2026-12-02 13:21 ` Andrew Lunn
2026-12-01 9:44 ` [PATCH net-next v5 4/4] net: phy: realtek: add hardware timestamping " javen
2026-12-01 10:36 ` Nicolai Buchwitz
2026-12-02 8:30 ` Javen
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=442df8997b3e455894e44c59418822b6@realsil.com.cn \
--to=javen_xu@realsil.com.cn \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.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®