[openwrt/openwrt] realtek: phy: simplify RTL8214C detection

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 27 14:26:35 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0ed688a4d9c72e2bc1b2197f13e44d10caa9841e

commit 0ed688a4d9c72e2bc1b2197f13e44d10caa9841e
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Fri Oct 18 03:00:18 2024 -0400

    realtek: phy: simplify RTL8214C detection
    
    The detection of the RTL8214C is a little complicated. Make it easier.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/16457
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c
index 2e52924f80..f9c656b659 100644
--- a/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c
@@ -1355,11 +1355,6 @@ static int rtl8218d_set_eee(struct phy_device *phydev, struct ethtool_eee *e)
 	return 0;
 }
 
-static int rtl8214c_match_phy_device(struct phy_device *phydev)
-{
-	return phydev->phy_id == PHY_ID_RTL8214C;
-}
-
 static int rtl8380_configure_rtl8214c(struct phy_device *phydev)
 {
 	u32 phy_id, val;
@@ -3895,10 +3890,9 @@ static int rtl9300_serdes_probe(struct phy_device *phydev)
 
 static struct phy_driver rtl83xx_phy_driver[] = {
 	{
-		PHY_ID_MATCH_MODEL(PHY_ID_RTL8214C),
+		PHY_ID_MATCH_EXACT(PHY_ID_RTL8214C),
 		.name		= "Realtek RTL8214C",
 		.features	= PHY_GBIT_FEATURES,
-		.match_phy_device = rtl8214c_match_phy_device,
 		.probe		= rtl8214c_phy_probe,
 		.read_page	= rtl821x_read_page,
 		.write_page	= rtl821x_write_page,




More information about the lede-commits mailing list