mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
21549dbf7b
Update patch set for new release and add required kernel option
CONFIG_ZRAM_TRACK_ENTRY_ACTIME to generic config
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.66
Manually rebased:
bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch
bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch
Removed upstreamed:
bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch[1]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.66&id=e0388a95736abd1f5f5a94221dd1ac24eacbd4d7
Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17271
(cherry picked from commit 28f534d953
)
Link: https://github.com/openwrt/openwrt/pull/17302
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
97 lines
2.9 KiB
Diff
97 lines
2.9 KiB
Diff
From f5d59230ec26aa5e8b59e9f4a4d288703a737479 Mon Sep 17 00:00:00 2001
|
|
From: Heiner Kallweit <hkallweit1@gmail.com>
|
|
Date: Wed, 31 Jan 2024 21:31:01 +0100
|
|
Subject: [PATCH] r8169: simplify EEE handling
|
|
|
|
We don't have to store the EEE modes to be advertised in the driver,
|
|
phylib does this for us and stores it in phydev->advertising_eee.
|
|
phylib also takes care of properly handling the EEE advertisement.
|
|
|
|
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
|
Link: https://lore.kernel.org/r/27c336a8-ea47-483d-815b-02c45ae41da2@gmail.com
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/ethernet/realtek/r8169_main.c | 32 +++--------------------
|
|
1 file changed, 4 insertions(+), 28 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
|
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
|
@@ -656,7 +656,6 @@ struct rtl8169_private {
|
|
struct rtl8169_counters *counters;
|
|
struct rtl8169_tc_offsets tc_offset;
|
|
u32 saved_wolopts;
|
|
- int eee_adv;
|
|
|
|
const char *fw_name;
|
|
struct rtl_fw *rtl_fw;
|
|
@@ -2037,17 +2036,11 @@ static int rtl8169_get_eee(struct net_de
|
|
static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data)
|
|
{
|
|
struct rtl8169_private *tp = netdev_priv(dev);
|
|
- int ret;
|
|
|
|
if (!rtl_supports_eee(tp))
|
|
return -EOPNOTSUPP;
|
|
|
|
- ret = phy_ethtool_set_eee(tp->phydev, data);
|
|
-
|
|
- if (!ret)
|
|
- tp->eee_adv = phy_read_mmd(dev->phydev, MDIO_MMD_AN,
|
|
- MDIO_AN_EEE_ADV);
|
|
- return ret;
|
|
+ return phy_ethtool_set_eee(tp->phydev, data);
|
|
}
|
|
|
|
static void rtl8169_get_ringparam(struct net_device *dev,
|
|
@@ -2112,21 +2105,6 @@ static const struct ethtool_ops rtl8169_
|
|
.set_pauseparam = rtl8169_set_pauseparam,
|
|
};
|
|
|
|
-static void rtl_enable_eee(struct rtl8169_private *tp)
|
|
-{
|
|
- struct phy_device *phydev = tp->phydev;
|
|
- int adv;
|
|
-
|
|
- /* respect EEE advertisement the user may have set */
|
|
- if (tp->eee_adv >= 0)
|
|
- adv = tp->eee_adv;
|
|
- else
|
|
- adv = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE);
|
|
-
|
|
- if (adv >= 0)
|
|
- phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_ADV, adv);
|
|
-}
|
|
-
|
|
static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
|
|
{
|
|
/*
|
|
@@ -2363,9 +2341,6 @@ static void rtl8169_init_phy(struct rtl8
|
|
/* We may have called phy_speed_down before */
|
|
phy_speed_up(tp->phydev);
|
|
|
|
- if (rtl_supports_eee(tp))
|
|
- rtl_enable_eee(tp);
|
|
-
|
|
genphy_soft_reset(tp->phydev);
|
|
}
|
|
|
|
@@ -5120,7 +5095,9 @@ static int r8169_mdio_register(struct rt
|
|
}
|
|
|
|
tp->phydev->mac_managed_pm = true;
|
|
-
|
|
+ if (rtl_supports_eee(tp))
|
|
+ linkmode_copy(tp->phydev->advertising_eee,
|
|
+ tp->phydev->supported_eee);
|
|
phy_support_asym_pause(tp->phydev);
|
|
|
|
/* PHY will be woken up in rtl_open() */
|
|
@@ -5255,7 +5232,6 @@ static int rtl_init_one(struct pci_dev *
|
|
tp->dev = dev;
|
|
tp->pci_dev = pdev;
|
|
tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1;
|
|
- tp->eee_adv = -1;
|
|
tp->ocp_base = OCP_STD_PHY_BASE;
|
|
|
|
raw_spin_lock_init(&tp->cfg9346_usage_lock);
|