From: Zhao Dongdong <winter91@foxmail.com>
To: davem@davemloft.net, andrew@lunn.ch, hkallweit1@gmail.com,
kuba@kernel.org
Cc: netdev@vger.kernel.org, Zhao Dongdong <zhaodongdong@kylinos.cn>
Subject: [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan
Date: Tue, 12 May 2026 16:25:21 +0800 [thread overview]
Message-ID: <tencent_F7CCFD2243D4A5BBFDEDEEB978E0E6479405@qq.com> (raw)
From: Zhao Dongdong <zhaodongdong@kylinos.cn>
Added the mdio_c45_bad_oui_list to facilitate adding more PHYs that
do not support C45 scanning.
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
---
drivers/net/phy/mdio_bus_provider.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/mdio_bus_provider.c b/drivers/net/phy/mdio_bus_provider.c
index ce3a607a40cb..928586602eff 100644
--- a/drivers/net/phy/mdio_bus_provider.c
+++ b/drivers/net/phy/mdio_bus_provider.c
@@ -522,15 +522,21 @@ static int mdiobus_scan_bus_c45(struct mii_bus *bus)
* devices have been found, see if any of them are bad for C45, and if we
* should skip the C45 scan.
*/
+static const u32 mdio_c45_bad_oui_list[] = {
+ MICREL_OUI,
+};
static bool mdiobus_prevent_c45_scan(struct mii_bus *bus)
{
struct phy_device *phydev;
mdiobus_for_each_phy(bus, phydev) {
u32 oui = phydev->phy_id >> 10;
+ int i;
- if (oui == MICREL_OUI)
- return true;
+ for (i = 0; i < ARRAY_SIZE(mdio_c45_bad_oui_list); i++) {
+ if (oui == mdio_c45_bad_oui_list[i])
+ return true;
+ }
}
return false;
--
2.25.1
next reply other threads:[~2026-05-12 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 8:25 Zhao Dongdong [this message]
2026-05-12 12:26 ` [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan Andrew Lunn
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=tencent_F7CCFD2243D4A5BBFDEDEEB978E0E6479405@qq.com \
--to=winter91@foxmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zhaodongdong@kylinos.cn \
/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