From a8dea562aa6146f5955ef081ee3240f0b960edf9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 27 Feb 2025 08:04:50 +0100 Subject: [PATCH] kernel: r8125: update to v9.015.00 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Changelog: https://github.com/openwrt/rtl8125/compare/9.014.01...9.015.00 Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8125/Makefile | 4 ++-- ...0-r8125-print-link-speed-and-duplex-mode.patch | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index 647630393a..232cf695b8 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 -PKG_VERSION:=9.014.01 +PKG_VERSION:=9.015.00 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION) -PKG_HASH:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13 +PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3 PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPLv2 diff --git a/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch b/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch index a3b3562149..449cc9a7e2 100644 --- a/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch +++ b/package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch @@ -18,11 +18,12 @@ Signed-off-by: Álvaro Fernández Rojas --- a/src/r8125.h +++ b/src/r8125.h -@@ -1672,6 +1672,8 @@ enum RTL8125_register_content { +@@ -1687,6 +1687,9 @@ enum RTL8125_register_content { LinkStatus = 0x02, FullDup = 0x01, +#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup) ++#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL) + /* DBG_reg */ Fix_Nak_1 = (1 << 4), @@ -37,11 +38,11 @@ Signed-off-by: Álvaro Fernández Rojas #include #include #include -@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic +@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic #endif } -+static unsigned int rtl8125_phy_duplex(u16 status) ++static unsigned int rtl8125_phy_duplex(u32 status) +{ + unsigned int duplex = DUPLEX_UNKNOWN; + @@ -55,14 +56,14 @@ Signed-off-by: Álvaro Fernández Rojas + return duplex; +} + -+static int rtl8125_phy_speed(u16 status) ++static int rtl8125_phy_speed(u32 status) +{ + int speed = SPEED_UNKNOWN; + + if (status & LinkStatus) { + if (status & _2500bpsF) + speed = SPEED_2500; -+ else if (status & _1000bpsF) ++ else if (status & RTL8125_SPEED_1000_MASK) + speed = SPEED_1000; + else if (status & _100bps) + speed = SPEED_100; @@ -76,14 +77,14 @@ Signed-off-by: Álvaro Fernández Rojas static void _rtl8125_check_link_status(struct net_device *dev, unsigned int link_state) { -@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de +@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de if (link_state == R8125_LINK_STATE_ON) { rtl8125_link_on_patch(dev); - if (netif_msg_ifup(tp)) - printk(KERN_INFO PFX "%s: link up\n", dev->name); + if (netif_msg_ifup(tp)) { -+ const u16 phy_status = RTL_R16(tp, PHYstatus); ++ const u32 phy_status = RTL_R32(tp, PHYstatus); + const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status); + const int phy_speed = rtl8125_phy_speed(phy_status); + printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n", -- 2.30.2