Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.36 Remove upstream patches: generic/backport-6.12/780-09-v6.13-r8169-add-support-for-RTL8125D.patch[1] generic/backport-6.12/781-04-v6.13-net-phy-realtek-merge-the-drivers-for-internal-NBase.patch[2] generic/backport-6.12/781-05-v6.13-net-phy-realtek-add-RTL8125D-internal-PHY.patch[3] All other patches are automatically refreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.36&id=37cb5967bd2513416398ff1a87a5ee2e63270b00 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.36&id=5eb0b10eea271e2e1f7d4fa1a6af6c09b2ecc4f5 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.36&id=5d479182d4ccde76df830a72927b3bdaafd142bf Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Tested-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19317 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
53 lines
1.7 KiB
Diff
53 lines
1.7 KiB
Diff
From 68d5cd09e8919679ce13b85950debea4b2e98e04 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Thu, 10 Oct 2024 14:07:26 +0100
|
|
Subject: [PATCH] net: phy: realtek: change order of calls in C22 read_status()
|
|
|
|
Always call rtlgen_read_status() first, so genphy_read_status() which
|
|
is called by it clears bits in case auto-negotiation has not completed.
|
|
Also clear 10GBT link-partner advertisement bits in case auto-negotiation
|
|
is disabled or has not completed.
|
|
|
|
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
Link: https://patch.msgid.link/b15929a41621d215c6b2b57393368086589569ec.1728565530.git.daniel@makrotopia.org
|
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
---
|
|
drivers/net/phy/realtek.c | 22 +++++++++++++++-------
|
|
1 file changed, 15 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/net/phy/realtek.c
|
|
+++ b/drivers/net/phy/realtek.c
|
|
@@ -950,17 +950,25 @@ static void rtl822xb_update_interface(st
|
|
|
|
static int rtl822x_read_status(struct phy_device *phydev)
|
|
{
|
|
- if (phydev->autoneg == AUTONEG_ENABLE) {
|
|
- int lpadv = phy_read_paged(phydev, 0xa5d, 0x13);
|
|
+ int lpadv, ret;
|
|
|
|
- if (lpadv < 0)
|
|
- return lpadv;
|
|
+ ret = rtlgen_read_status(phydev);
|
|
+ if (ret < 0)
|
|
+ return ret;
|
|
|
|
- mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising,
|
|
- lpadv);
|
|
+ if (phydev->autoneg == AUTONEG_DISABLE ||
|
|
+ !phydev->autoneg_complete) {
|
|
+ mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, 0);
|
|
+ return 0;
|
|
}
|
|
|
|
- return rtlgen_read_status(phydev);
|
|
+ lpadv = phy_read_paged(phydev, 0xa5d, 0x13);
|
|
+ if (lpadv < 0)
|
|
+ return lpadv;
|
|
+
|
|
+ mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising, lpadv);
|
|
+
|
|
+ return 0;
|
|
}
|
|
|
|
static int rtl822xb_read_status(struct phy_device *phydev)
|