net: phy: mediatek: remove PHY mode check on MT7531
authorDENG Qingfang <dqfext@gmail.com>
Wed, 9 Feb 2022 14:39:47 +0000 (22:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:12 +0000 (12:03 +0100)
commit0e6727589aeafbc28e8d1a0de2711da115379722
treee6acad5f3995a62d02538e0bbd84ce30da723dc5
parent7de7ba7a8bd4fde0141de8674c13514d0072f0e6
net: phy: mediatek: remove PHY mode check on MT7531

commit 525b108e6d95b643eccbd84fb10aa9aa101b18dd 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: e40d2cca0189 ("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>
drivers/net/phy/mediatek-ge.c