net: phy: mediatek: remove PHY mode check on MT7531
Subsystems (4)
PATCH 1/1 net: phy: mediatek: remove PHY mode check on MT7531
The function mt7531_phy_mode_supported in the DSA driver set supported mode to PHY_INTERFACE_MODE_GMII instead of PHY_INTERFACE_MODE_INTERNAL for the internal PHY, so this check breaks the PHY initialization:
mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY: -EINVAL
Remove the check to make it work again.
--- drivers/net/phy/mediatek-ge.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/phy/mediatek-ge.c +0 -3
@@ -55,9 +55,6 @@ static int mt7530_phy_config_init(struct phy_device *phydev)static int mt7531_phy_config_init (struct phy_device *phydev) { -if (phydev->interface !=PHY_INTERFACE_MODE_INTERNAL ) -return -EINVAL ; -mtk_gephy_config_init (phydev);/* PHY link down power saving enable */
Signature · 1 line
2.25.1
Quoted 20 lines · DENG Qingfang
The function
mt7531_phy_mode_supportedin the DSA driver set supported mode toPHY_INTERFACE_MODE_GMIIinstead ofPHY_INTERFACE_MODE_INTERNALfor the internal PHY, so this check breaks the PHY initialization:mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY:
-EINVALRemove the check to make it work again.
Reported-by Hauke Mehrtens <[email protected]>Fixes e40d2cca0189 ("net: phy: add MediaTek Gigabit Ethernet PHY driver")Signed-off-by DENG Qingfang <[email protected]>--- drivers/net/phy/mediatek-ge.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/phy/mediatek-ge.c +0
-0
drivers/net/phy/mediatek-ge.c static int mt7530_phy_config_init(struct phy_device *phydev) · line 60
Quoted 9 lines
drivers/net/phy/mediatek-ge.c +0
-3@@ -55,9 +55,6 @@ static int mt7530_phy_config_init(struct phy_device *phydev)static int mt7531_phy_config_init (struct phy_device *phydev) { -if (phydev->interface !=PHY_INTERFACE_MODE_INTERNAL ) -return -EINVAL ; -mtk_gephy_config_init (phydev);/* PHY link down power saving enable */
Thanks for submitting this!
Cheers.
Arınç
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Andrew Lunn
maintainerQuoted 3 lines · DENG Qingfang
The function
mt7531_phy_mode_supportedin the DSA driver set supported mode toPHY_INTERFACE_MODE_GMIIinstead ofPHY_INTERFACE_MODE_INTERNALfor the internal PHY, so this check breaks the PHY initialization:
Is the PHY actually internal? If so PHY_INTERFACE_MODE_INTERNAL would be correct.
Are you fixing the wrong thing here?
Andrew
Quoted 3 lines · Andrew Lunn
Is the PHY actually internal? If so
PHY_INTERFACE_MODE_INTERNALwould be correct.
I have no idea. Maybe it internally connects to the MAC with GMII. Add CC to mt7530 maintainers.
Quoted 4 lines
Are you fixing the wrong thing here?
Andrew
Quoted 11 lines · DENG Qingfang
The function
mt7531_phy_mode_supportedin the DSA driver set supported mode toPHY_INTERFACE_MODE_GMIIinstead ofPHY_INTERFACE_MODE_INTERNALfor the internal PHY, so this check breaks the PHY initialization:mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY:
-EINVALRemove the check to make it work again.
Reported-by Hauke Mehrtens <[email protected]>Fixes e40d2cca0189 ("net: phy: add MediaTek Gigabit Ethernet PHY driver")Signed-off-by DENG Qingfang <[email protected]>
Quoted 18 lines
--- drivers/net/phy/mediatek-ge.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/phy/mediatek-ge.c +0
-3@@ -55,9 +55,6 @@ static int mt7530_phy_config_init(struct phy_device *phydev)static int mt7531_phy_config_init (struct phy_device *phydev) { -if (phydev->interface !=PHY_INTERFACE_MODE_INTERNAL ) -return -EINVAL ; -mtk_gephy_config_init (phydev);/* PHY link down power saving enable */
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 9 lines · On Wed, 9 Feb 2022 22:39:47 +0800 you wrote:
The function
mt7531_phy_mode_supportedin the DSA driver set supported mode toPHY_INTERFACE_MODE_GMIIinstead ofPHY_INTERFACE_MODE_INTERNALfor the internal PHY, so this check breaks the PHY initialization:mt7530 mdio-bus:00 wan (uninitialized): failed to connect to PHY:
-EINVALRemove the check to make it work again.
[...]
Here is the summary with links:
- [net] net: phy: mediatek: remove PHY mode check on MT7531
https://git.kernel.org/netdev/net/c/525b108e6d95
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html