forked from Openwrt-EcoNet/openwrt
83d962316128 net: phy: realtek: add RTL8127-internal PHY 708686132ba0 net: phy: realtek: Add support for PHY LEDs on RTL8211E be1cc96ddf82 net: phy: realtek: use __set_bit() in rtl8211f_led_hw_control_get() 8c4d0172657c net: phy: realtek: Group RTL82* macro definitions 12d40df259e3 net: phy: realtek: add RTL8211F register defines 7c6fa3ffd265 net: phy: realtek: Clean up RTL821x ExtPage access f3b265358b91 net: phy: realtek: remove unsed RTL821x_PHYSR* macros 7840e4d6f48a net: phy: realtek: Add support for WOL magic packet on RTL8211F Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Thu, 30 Jan 2025 05:38:31 +0000
|
|
Subject: [PATCH] net: phy: realtek: disable MDIO broadcast
|
|
|
|
RealTek's PHYs by default also listen on MDIO address 0 which is defined
|
|
as broadcast address. This can lead to problems if there is an actual PHY
|
|
(such as MT7981 built-in PHY) present at this address, as accessing that
|
|
PHY may then confuse the RealTek PHY.
|
|
|
|
Disabled listening on the MDIO broadcast address to avoid such problems.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
---
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -1050,6 +1050,11 @@ static int rtl822xb_config_init(struct p
|
|
phydev->host_interfaces) ||
|
|
phydev->interface == PHY_INTERFACE_MODE_SGMII;
|
|
|
|
+ /* disable listening on MDIO broadcast address (0) */
|
|
+ ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, 0xa430, BIT(13));
|
|
+ if (ret < 0)
|
|
+ return ret;
|
|
+
|
|
/* fill in possible interfaces */
|
|
__assign_bit(PHY_INTERFACE_MODE_2500BASEX, phydev->possible_interfaces,
|
|
has_2500);
|