bump to 2.17.1
This commit is contained in:
parent
1bb0e8ff4b
commit
4b3625e6a3
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=r8152
|
PKG_NAME:=r8152
|
||||||
PKG_VERSION:=2.16.3
|
PKG_VERSION:=2.17.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
--- a/compatibility.h
|
|
||||||
+++ b/compatibility.h
|
|
||||||
@@ -237,9 +237,15 @@
|
|
||||||
#define napi_disable(napi_ptr) netif_poll_disable(container_of(napi_ptr, struct r8152, napi)->netdev)
|
|
||||||
#define napi_schedule(napi_ptr) netif_rx_schedule(container_of(napi_ptr, struct r8152, napi)->netdev)
|
|
||||||
#define napi_complete(napi_ptr) netif_rx_complete(container_of(napi_ptr, struct r8152, napi)->netdev)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
||||||
+ #define netif_napi_add_weight(ndev, napi_ptr, function, weight_t) \
|
|
||||||
+ ndev->poll = function; \
|
|
||||||
+ ndev->weight = weight_t;
|
|
||||||
+#else
|
|
||||||
#define netif_napi_add(ndev, napi_ptr, function, weight_t) \
|
|
||||||
ndev->poll = function; \
|
|
||||||
ndev->weight = weight_t;
|
|
||||||
+#endif
|
|
||||||
typedef unsigned long uintptr_t;
|
|
||||||
#define DMA_BIT_MASK(value) \
|
|
||||||
(value < 64 ? ((1ULL << value) - 1) : 0xFFFFFFFFFFFFFFFFULL)
|
|
||||||
--- a/r8152.c
|
|
||||||
+++ b/r8152.c
|
|
||||||
@@ -20718,10 +20718,17 @@
|
|
||||||
|
|
||||||
usb_set_intfdata(intf, tp);
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
|
||||||
+ if (tp->support_2500full)
|
|
||||||
+ netif_napi_add_weight(netdev, &tp->napi, r8152_poll, 256);
|
|
||||||
+ else
|
|
||||||
+ netif_napi_add_weight(netdev, &tp->napi, r8152_poll, 64);
|
|
||||||
+#else
|
|
||||||
if (tp->support_2500full)
|
|
||||||
netif_napi_add(netdev, &tp->napi, r8152_poll, 256);
|
|
||||||
else
|
|
||||||
netif_napi_add(netdev, &tp->napi, r8152_poll, 64);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ret = register_netdev(netdev);
|
|
||||||
if (ret != 0) {
|
|
@ -12,6 +12,8 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
r8152.c | 23 +++++++++++++++++++++++
|
r8152.c | 23 +++++++++++++++++++++++
|
||||||
1 file changed, 23 insertions(+)
|
1 file changed, 23 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/r8152.c b/r8152.c
|
||||||
|
index 5d6df58..40b7d17 100644
|
||||||
--- a/r8152.c
|
--- a/r8152.c
|
||||||
+++ b/r8152.c
|
+++ b/r8152.c
|
||||||
@@ -18,6 +18,7 @@
|
@@ -18,6 +18,7 @@
|
||||||
@ -22,7 +24,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
#include <linux/crc32.h>
|
#include <linux/crc32.h>
|
||||||
#include <linux/if_vlan.h>
|
#include <linux/if_vlan.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
@@ -10107,6 +10108,22 @@ static void rtl_disable_spi(struct r8152
|
@@ -10413,6 +10414,22 @@ static void rtl_disable_spi(struct r8152 *tp)
|
||||||
ocp_write_word(tp, MCU_TYPE_USB, 0xcbf0, ocp_data);
|
ocp_write_word(tp, MCU_TYPE_USB, 0xcbf0, ocp_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
static void r8152b_init(struct r8152 *tp)
|
static void r8152b_init(struct r8152 *tp)
|
||||||
{
|
{
|
||||||
u32 ocp_data;
|
u32 ocp_data;
|
||||||
@@ -10168,6 +10185,8 @@ static void r8152b_init(struct r8152 *tp
|
@@ -10476,6 +10493,8 @@ static void r8152b_init(struct r8152 *tp)
|
||||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
||||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
||||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
||||||
@ -54,7 +56,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void r8153_init(struct r8152 *tp)
|
static void r8153_init(struct r8152 *tp)
|
||||||
@@ -10311,6 +10330,8 @@ static void r8153_init(struct r8152 *tp)
|
@@ -10613,6 +10632,8 @@ static void r8153_init(struct r8152 *tp)
|
||||||
tp->coalesce = COALESCE_SLOW;
|
tp->coalesce = COALESCE_SLOW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -63,7 +65,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void r8153b_init(struct r8152 *tp)
|
static void r8153b_init(struct r8152 *tp)
|
||||||
@@ -10413,6 +10434,8 @@ static void r8153b_init(struct r8152 *tp
|
@@ -10705,6 +10726,8 @@ static void r8153b_init(struct r8152 *tp)
|
||||||
rtl_tally_reset(tp);
|
rtl_tally_reset(tp);
|
||||||
|
|
||||||
tp->coalesce = 15000; /* 15 us */
|
tp->coalesce = 15000; /* 15 us */
|
||||||
@ -72,3 +74,6 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void r8153c_init(struct r8152 *tp)
|
static void r8153c_init(struct r8152 *tp)
|
||||||
|
--
|
||||||
|
2.34.8
|
||||||
|
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
From 6ffb3760c34a904467d70830ac9c10211e8f5d3a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
|
|
||||||
Date: Wed, 14 Sep 2022 15:13:31 +0200
|
|
||||||
Subject: [PATCH] Fix for linux 5.19 without breaking older kernel
|
|
||||||
compatibility
|
|
||||||
|
|
||||||
---
|
|
||||||
r8152.c | 16 ++++++++++++----
|
|
||||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/r8152.c b/r8152.c
|
|
||||||
index 9c2bd16..5391b21 100644
|
|
||||||
--- a/r8152.c
|
|
||||||
+++ b/r8152.c
|
|
||||||
@@ -20458,9 +20458,13 @@ static ssize_t sg_en_store(struct device *dev, struct device_attribute *attr,
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
|
|
||||||
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0) */
|
|
||||||
+ netif_set_tso_max_size(netdev, tso_size);
|
|
||||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
|
|
||||||
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
|
|
||||||
netif_set_gso_max_size(netdev, tso_size);
|
|
||||||
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
@@ -20620,12 +20624,16 @@ static int rtl8152_probe(struct usb_interface *intf,
|
|
||||||
rtl_get_mapt_ver(tp);
|
|
||||||
|
|
||||||
netdev->ethtool_ops = &ops;
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)
|
|
||||||
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0) */
|
|
||||||
+ netif_set_tso_max_size(netdev, RTL_LIMITED_TSO_SIZE);
|
|
||||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
|
|
||||||
+/* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
|
|
||||||
if (!tp->sg_use)
|
|
||||||
netif_set_gso_max_size(netdev, RTL_LIMITED_TSO_SIZE);
|
|
||||||
#else
|
|
||||||
netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
|
|
||||||
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) */
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
|
|
||||||
/* MTU range: 68 - 1500 or 9194 */
|
|
@ -39,3 +39,20 @@
|
|||||||
|
|
||||||
Changes the number of ring entries for the Rx ring.
|
Changes the number of ring entries for the Rx ring.
|
||||||
# ethtool -G eth0 rx 100
|
# ethtool -G eth0 rx 100
|
||||||
|
|
||||||
|
- Tunable parameters
|
||||||
|
|
||||||
|
Get the current rx copybreak value in bytes.
|
||||||
|
# ethtool --get-tunable eth0 rx-copybreak
|
||||||
|
|
||||||
|
Set the rx copybreak value in bytes.
|
||||||
|
# ethtool --set-tunable eth0 rx-copybreak 256
|
||||||
|
|
||||||
|
- Flow control
|
||||||
|
|
||||||
|
Queries the specified Ethernet device for pause parameter information.
|
||||||
|
# ethtool -a eth0
|
||||||
|
|
||||||
|
Changes the pause parameters of the specified Ethernet device.
|
||||||
|
# ethtool -A eth0 rx off tx off (Disable flow control)
|
||||||
|
# ethtool -A eth0 rx on tx off (Enable flow control)
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
|
||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
|
||||||
|
#define TSO_LEGACY_MAX_SIZE 65536
|
||||||
|
#define netif_napi_add_weight netif_napi_add
|
||||||
|
#define netif_set_tso_max_size netif_set_gso_max_size
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0)
|
||||||
#define PHY_MAC_INTERRUPT PHY_IGNORE_INTERRUPT
|
#define PHY_MAC_INTERRUPT PHY_IGNORE_INTERRUPT
|
||||||
@ -613,6 +617,7 @@
|
|||||||
memcpy(dev->dev_addr, addr, 6);
|
memcpy(dev->dev_addr, addr, 6);
|
||||||
}
|
}
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */
|
||||||
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) */
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
|
1759
src/r8152.c
1759
src/r8152.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user