[][kernel][common][eth][Fix Intel X550 IOT issue]
[Description]
Fix Intel X550 IOT issue.
Due to X550 doesn't advertise 2.5G/5G link capability, phlylink
cannot resolve link speed/duplex in the phy_resolve_aneg_linkmode().
Therefore, we handle the link speed from vendor registers.
If without this patch, phylink will show unknown speed messages
when link with NBASE-T link partner.
[Release-log]
N/A
Change-Id: Iaef49fe8ea6ef7c6dc022e50456903b7feb4eef6
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/6852800
diff --git a/target/linux/mediatek/patches-5.4/747-net-phy-aquantia-add-AQR113C.patch b/target/linux/mediatek/patches-5.4/747-net-phy-aquantia-add-AQR113C.patch
index 4842524..8d01cab 100644
--- a/target/linux/mediatek/patches-5.4/747-net-phy-aquantia-add-AQR113C.patch
+++ b/target/linux/mediatek/patches-5.4/747-net-phy-aquantia-add-AQR113C.patch
@@ -10,6 +10,20 @@
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
+@@ -352,6 +352,13 @@ static int aqr107_read_status(struct phy_device *phydev)
+ break;
+ }
+
++ /* Handle the case when the link speed is unknown */
++ if (phydev->speed == SPEED_UNKNOWN) {
++ val = aqr107_read_rate(phydev);
++ if (val < 0)
++ return val;
++ }
++
+ val = aqr107_read_downshift_event(phydev);
+ if (val <= 0)
+ return val;
@@ -695,6 +696,24 @@ static struct phy_driver aqr_driver[] = {
.ack_interrupt = aqr_ack_interrupt,
.read_status = aqr_read_status,