Skip to content

Commit ae9e8d4

Browse files
committed
kernel: r8125: update to v9.015.00
Changelog: openwrt/rtl8125@9.014.01...9.015.00 Signed-off-by: Álvaro Fernández Rojas <[email protected]>
1 parent d0fa42a commit ae9e8d4

4 files changed

+27
-29
lines changed

package/kernel/r8125/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=r8125
4-
PKG_VERSION:=9.014.01
4+
PKG_VERSION:=9.015.00
55
PKG_RELEASE:=1
66

77
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
88
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
9-
PKG_HASH:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13
9+
PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3
1010

1111
PKG_BUILD_PARALLEL:=1
1212
PKG_LICENSE:=GPLv2

package/kernel/r8125/patches/100-kernel-6.9-support.patch

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--- a/src/r8125_n.c
22
+++ b/src/r8125_n.c
3-
@@ -7478,7 +7478,11 @@
3+
@@ -7314,7 +7314,11 @@ out:
44
}
5-
5+
#else
66
static int
77
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
88
+rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
@@ -12,8 +12,8 @@
1212
{
1313
struct rtl8125_private *tp = netdev_priv(net);
1414
struct ethtool_eee *eee = &tp->eee;
15-
@@ -7511,9 +7515,15 @@
16-
15+
@@ -7347,9 +7351,15 @@ rtl_ethtool_get_eee(struct net_device *n
16+
1717
edata->eee_enabled = !!val;
1818
edata->eee_active = !!(supported & adv & lp);
1919
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
@@ -27,10 +27,10 @@
2727
+#endif
2828
edata->tx_lpi_enabled = edata->eee_enabled;
2929
edata->tx_lpi_timer = tx_lpi_timer;
30-
31-
@@ -7521,11 +7531,18 @@
30+
31+
@@ -7357,11 +7367,18 @@ rtl_ethtool_get_eee(struct net_device *n
3232
}
33-
33+
3434
static int
3535
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
3636
+rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
@@ -45,11 +45,11 @@
4545
+ u32 adv;
4646
+#endif
4747
int rc = 0;
48-
48+
4949
if (!HW_HAS_WRITE_PHY_MCU_RAM_CODE(tp) ||
50-
@@ -7557,6 +7574,18 @@
50+
@@ -7393,6 +7410,18 @@ rtl_ethtool_set_eee(struct net_device *n
5151
*/
52-
52+
5353
advertising = tp->advertising;
5454
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
5555
+ ethtool_convert_link_mode_to_legacy_u32(&adv, edata->advertised);
@@ -66,12 +66,12 @@
6666
if (!edata->advertised) {
6767
edata->advertised = advertising & eee->supported;
6868
} else if (edata->advertised & ~advertising) {
69-
@@ -7565,13 +7594,23 @@
69+
@@ -7401,18 +7430,32 @@ rtl_ethtool_set_eee(struct net_device *n
7070
rc = -EINVAL;
7171
goto out;
7272
}
7373
+#endif
74-
74+
7575
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
7676
+ if (!linkmode_empty(edata->advertised) & ~eee->supported) {
7777
+ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
@@ -87,13 +87,10 @@
8787
goto out;
8888
}
8989
+#endif
90-
90+
9191
//tp->eee.eee_enabled = edata->eee_enabled;
92-
//tp->eee_adv_t = ethtool_adv_to_mmd_eee_adv_t(edata->advertised);
93-
@@ -7579,7 +7618,11 @@
94-
dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE tx_lpi_timer %x must be a subset of support %x\n",
95-
edata->tx_lpi_timer, eee->tx_lpi_timer);
96-
92+
//tp->eee_adv_t = rtl8125_ethtool_adv_to_mmd_eee_adv_cap1_t(edata->advertised);
93+
9794
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
9895
+ ethtool_convert_link_mode_to_legacy_u32(&eee->advertised, edata->advertised);
9996
+#else

package/kernel/r8125/patches/200-r8125-print-link-speed-and-duplex-mode.patch

+8-7
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ Signed-off-by: Álvaro Fernández Rojas <[email protected]>
1717

1818
--- a/src/r8125.h
1919
+++ b/src/r8125.h
20-
@@ -1672,6 +1672,8 @@ enum RTL8125_register_content {
20+
@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
2121
LinkStatus = 0x02,
2222
FullDup = 0x01,
2323

2424
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
25+
+#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
2526
+
2627
/* DBG_reg */
2728
Fix_Nak_1 = (1 << 4),
@@ -36,11 +37,11 @@ Signed-off-by: Álvaro Fernández Rojas <[email protected]>
3637
#include <linux/netdevice.h>
3738
#include <linux/etherdevice.h>
3839
#include <linux/delay.h>
39-
@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic
40+
@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
4041
#endif
4142
}
4243

43-
+static unsigned int rtl8125_phy_duplex(u16 status)
44+
+static unsigned int rtl8125_phy_duplex(u32 status)
4445
+{
4546
+ unsigned int duplex = DUPLEX_UNKNOWN;
4647
+
@@ -54,14 +55,14 @@ Signed-off-by: Álvaro Fernández Rojas <[email protected]>
5455
+ return duplex;
5556
+}
5657
+
57-
+static int rtl8125_phy_speed(u16 status)
58+
+static int rtl8125_phy_speed(u32 status)
5859
+{
5960
+ int speed = SPEED_UNKNOWN;
6061
+
6162
+ if (status & LinkStatus) {
6263
+ if (status & _2500bpsF)
6364
+ speed = SPEED_2500;
64-
+ else if (status & _1000bpsF)
65+
+ else if (status & RTL8125_SPEED_1000_MASK)
6566
+ speed = SPEED_1000;
6667
+ else if (status & _100bps)
6768
+ speed = SPEED_100;
@@ -75,14 +76,14 @@ Signed-off-by: Álvaro Fernández Rojas <[email protected]>
7576
static void
7677
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
7778
{
78-
@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de
79+
@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
7980
if (link_state == R8125_LINK_STATE_ON) {
8081
rtl8125_link_on_patch(dev);
8182

8283
- if (netif_msg_ifup(tp))
8384
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
8485
+ if (netif_msg_ifup(tp)) {
85-
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
86+
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
8687
+ const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status);
8788
+ const int phy_speed = rtl8125_phy_speed(phy_status);
8889
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",

package/kernel/r8125/patches/300-r8125-add-LED-configuration-from-OF.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <linux/if_vlan.h>
99
#include <linux/crc32.h>
1010
#include <linux/interrupt.h>
11-
@@ -14756,6 +14757,22 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
11+
@@ -14265,6 +14266,22 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
1212
}
1313

1414
static void
@@ -31,7 +31,7 @@
3131
rtl8125_init_software_variable(struct net_device *dev)
3232
{
3333
struct rtl8125_private *tp = netdev_priv(dev);
34-
@@ -15358,6 +15375,7 @@ rtl8125_init_software_variable(struct ne
34+
@@ -14720,6 +14737,7 @@ rtl8125_init_software_variable(struct ne
3535
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
3636
tp->rtl8125_rx_config &= ~EnableRxDescV4_1;
3737

0 commit comments

Comments
 (0)