[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230612143320.2077-1-zhaojh329@gmail.com>
Date: Mon, 12 Jun 2023 22:33:20 +0800
From: Jianhui Zhao <zhaojh329@...il.com>
To: andrew@...n.ch
Cc: hkallweit1@...il.com,
linux@...linux.org.uk,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jianhui Zhao <zhaojh329@...il.com>
Subject: [PATCH] net: phy: Assign the c45 id to phy_id property when matched.
If a phydevice use c45, its phy_id property is always 0 previously.
This change make the phy_id property has a valid value assigned from
c45 id.
Signed-off-by: Jianhui Zhao <zhaojh329@...il.com>
---
drivers/net/phy/phy_device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 {
--
2.34.1
Powered by blists - more mailing lists