Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan
@ 2026-05-12  8:25 Zhao Dongdong
  2026-05-12 12:26 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Zhao Dongdong @ 2026-05-12  8:25 UTC (permalink / raw)
  To: davem, andrew, hkallweit1, kuba; +Cc: netdev, Zhao Dongdong

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan
  2026-05-12  8:25 [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan Zhao Dongdong
@ 2026-05-12 12:26 ` Andrew Lunn
  2026-05-13  2:38   ` [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for Zhao Dongdong
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2026-05-12 12:26 UTC (permalink / raw)
  To: Zhao Dongdong; +Cc: davem, hkallweit1, kuba, netdev, Zhao Dongdong

On Tue, May 12, 2026 at 04:25:21PM +0800, Zhao Dongdong wrote:
> 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>

Please make this is patch series which adds the PHY you have which is
also broken.

    Andrew

---
pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for
  2026-05-12 12:26 ` Andrew Lunn
@ 2026-05-13  2:38   ` Zhao Dongdong
  0 siblings, 0 replies; 3+ messages in thread
From: Zhao Dongdong @ 2026-05-13  2:38 UTC (permalink / raw)
  To: andrew; +Cc: davem, hkallweit1, kuba, netdev, winter91, zhaodongdong

On Tue, 12 May 2026 14:26:48 +0200, Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Tue, May 12, 2026 at 04:25:21PM +0800, Zhao Dongdong wrote:
> > 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>
>
> Please make this is patch series which adds the PHY you have which is
> also broken.
>
>     Andrew
>
> ---
> pw-bot: cr

Thanks for the review.
The PHY driver hasn't been upstreamed yet. We can bundle it with this patch and submit them together once it's ready.


-- 
Regards,
    Zhao Dongdong


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-13  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  8:25 [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for mdiobus_prevent_c45_scan Zhao Dongdong
2026-05-12 12:26 ` Andrew Lunn
2026-05-13  2:38   ` [PATCH] net: mdiobus: add mdio_c45_bad_oui_list for Zhao Dongdong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox