Skip to content

Commit

Permalink
net: phy: mediatek: remove PHY mode check on MT7531
Browse files Browse the repository at this point in the history
commit 525b108 upstream.

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.

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Fixes: e40d2cc ("net: phy: add MediaTek Gigabit Ethernet PHY driver")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
LGA1150 authored and gregkh committed Feb 23, 2022
1 parent 7de7ba7 commit 0e67275
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/phy/mediatek-ge.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 0e67275

Please sign in to comment.