From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
richardcochran@gmail.com, vladimir.oltean@nxp.com,
vadim.fedorenko@linux.dev, christophe.jaillet@wanadoo.fr,
rosenp@gmail.com, steen.hegelund@microchip.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v4 1/2] phy: mscc: Use PHY_ID_MATCH_MODEL for VSC8584, VSC8582, VSC8575, VSC856X
Date: Tue, 21 Oct 2025 10:09:00 +0100 [thread overview]
Message-ID: <aPdNrFe4JfCTNbAM@shell.armlinux.org.uk> (raw)
In-Reply-To: <20251017064819.3048793-2-horatiu.vultur@microchip.com>
On Fri, Oct 17, 2025 at 08:48:18AM +0200, Horatiu Vultur wrote:
> As the PHYs VSC8584, VSC8582, VSC8575 and VSC856X exists only as rev B,
> we can use PHY_ID_MATCH_MODEL to match exactly on revision B of the PHY.
I don't follow this. PHY_ID_MATCH_MODEL() uses a mask of bits 31:4,
omitting the revision field. So that is equivalent to a .phy_id_mask
of 0xfffffff0, which is what the code already uses.
> Because of this change then there is not need the check if it is a
> different revision than rev B in the function vsc8584_probe() as we
> already know that this will never happen.
Since bits 3:0 are masked out, this statement seems to be false.
> @@ -2587,9 +2576,8 @@ static struct phy_driver vsc85xx_driver[] = {
> .config_inband = vsc85xx_config_inband,
> },
> {
> - .phy_id = PHY_ID_VSC856X,
> + PHY_ID_MATCH_MODEL(PHY_ID_VSC856X),
> .name = "Microsemi GE VSC856X SyncE",
> - .phy_id_mask = 0xfffffff0,
> /* PHY_GBIT_FEATURES */
> .soft_reset = &genphy_soft_reset,
> .config_init = &vsc8584_config_init,
> @@ -2667,9 +2655,8 @@ static struct phy_driver vsc85xx_driver[] = {
> .config_inband = vsc85xx_config_inband,
> },
> {
> - .phy_id = PHY_ID_VSC8575,
> + PHY_ID_MATCH_MODEL(PHY_ID_VSC8575),
> .name = "Microsemi GE VSC8575 SyncE",
> - .phy_id_mask = 0xfffffff0,
> /* PHY_GBIT_FEATURES */
> .soft_reset = &genphy_soft_reset,
> .config_init = &vsc8584_config_init,
> @@ -2693,9 +2680,8 @@ static struct phy_driver vsc85xx_driver[] = {
> .config_inband = vsc85xx_config_inband,
> },
> {
> - .phy_id = PHY_ID_VSC8582,
> + PHY_ID_MATCH_MODEL(PHY_ID_VSC8582),
> .name = "Microsemi GE VSC8582 SyncE",
> - .phy_id_mask = 0xfffffff0,
> /* PHY_GBIT_FEATURES */
> .soft_reset = &genphy_soft_reset,
> .config_init = &vsc8584_config_init,
> @@ -2719,9 +2705,8 @@ static struct phy_driver vsc85xx_driver[] = {
> .config_inband = vsc85xx_config_inband,
> },
> {
> - .phy_id = PHY_ID_VSC8584,
> + PHY_ID_MATCH_MODEL(PHY_ID_VSC8584),
> .name = "Microsemi GE VSC8584 SyncE",
> - .phy_id_mask = 0xfffffff0,
> /* PHY_GBIT_FEATURES */
> .soft_reset = &genphy_soft_reset,
> .config_init = &vsc8584_config_init,
Due to what I've said above, the above part of the patch is a cleanup,
and functionally is a no-op.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-10-21 9:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 6:48 [PATCH net v4 0/2] phy: mscc: Fix PTP for VSC8574 and VSC8572 Horatiu Vultur
2025-10-17 6:48 ` [PATCH net v4 1/2] phy: mscc: Use PHY_ID_MATCH_MODEL for VSC8584, VSC8582, VSC8575, VSC856X Horatiu Vultur
2025-10-17 7:42 ` Maxime Chevallier
2025-10-21 9:09 ` Russell King (Oracle) [this message]
2025-10-22 7:56 ` Horatiu Vultur
2025-10-21 23:51 ` Jakub Kicinski
2025-10-17 6:48 ` [PATCH net v4 2/2] phy: mscc: Fix PTP for VSC8574 and VSC8572 Horatiu Vultur
2025-10-17 7:41 ` Maxime Chevallier
2025-10-20 23:53 ` Jakub Kicinski
2025-10-21 9:07 ` Paolo Abeni
2025-10-21 23:52 ` Jakub Kicinski
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=aPdNrFe4JfCTNbAM@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rosenp@gmail.com \
--cc=steen.hegelund@microchip.com \
--cc=vadim.fedorenko@linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).