[PATCH] net: phy: Add sysfs attribute for PHY c45 identifiers.

From: Jianhui Zhao
Date: Mon Jun 12 2023 - 10:04:47 EST


diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 17d0d0555a79..81a4bc043ee2 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -541,8 +541,10 @@ static int phy_bus_match(struct device *dev, struct device_driver *drv)

if ((phydrv->phy_id & phydrv->phy_id_mask) ==
(phydev->c45_ids.device_ids[i] &
- phydrv->phy_id_mask))
+ phydrv->phy_id_mask)) {
+ phydev->phy_id = phydev->c45_ids.device_ids[i];
return 1;
+ }
}
return 0;
} else {

How about modifying it like this?