r8152: bump to 2.18.1
Signed-off-by: sbwml <admin@cooluc.com>
This commit is contained in:
parent
c990fdfb1a
commit
6c8740d2b6
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.17.1
|
PKG_VERSION:=2.18.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)
|
||||||
|
@ -12,8 +12,6 @@ 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 @@
|
||||||
@ -24,8 +22,8 @@ index 5d6df58..40b7d17 100644
|
|||||||
#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>
|
||||||
@@ -10413,6 +10414,22 @@ static void rtl_disable_spi(struct r8152 *tp)
|
@@ -12596,6 +12597,22 @@ out:
|
||||||
ocp_write_word(tp, MCU_TYPE_USB, 0xcbf0, ocp_data);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
+static int r8152_led_configuration(struct r8152 *tp)
|
+static int r8152_led_configuration(struct r8152 *tp)
|
||||||
@ -44,36 +42,42 @@ index 5d6df58..40b7d17 100644
|
|||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
static void r8152b_init(struct r8152 *tp)
|
static int r8152b_init(struct r8152 *tp)
|
||||||
{
|
{
|
||||||
u32 ocp_data;
|
int ret;
|
||||||
@@ -10476,6 +10493,8 @@ static void r8152b_init(struct r8152 *tp)
|
@@ -12695,6 +12712,8 @@ static int r8152b_init(struct r8152 *tp)
|
||||||
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
|
ret = ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_USB_CTRL,
|
||||||
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
|
RX_AGG_DISABLE | RX_ZERO_EN);
|
||||||
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
|
|
||||||
+
|
|
||||||
+ r8152_led_configuration(tp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void r8153_init(struct r8152 *tp)
|
+ r8152_led_configuration(tp);
|
||||||
@@ -10613,6 +10632,8 @@ static void r8153_init(struct r8152 *tp)
|
+
|
||||||
tp->coalesce = COALESCE_SLOW;
|
out:
|
||||||
|
return (ret < 0) ? ret : 0;
|
||||||
|
}
|
||||||
|
@@ -12883,6 +12902,8 @@ static int r8153_init(struct r8152 *tp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
+
|
|
||||||
+ r8152_led_configuration(tp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void r8153b_init(struct r8152 *tp)
|
+ r8152_led_configuration(tp);
|
||||||
@@ -10705,6 +10726,8 @@ static void r8153b_init(struct r8152 *tp)
|
+
|
||||||
rtl_tally_reset(tp);
|
out:
|
||||||
|
return (ret < 0) ? ret : 0;
|
||||||
|
}
|
||||||
|
@@ -13013,6 +13034,8 @@ static int r8153b_init(struct r8152 *tp)
|
||||||
|
|
||||||
tp->coalesce = 15000; /* 15 us */
|
tp->coalesce = 15000; /* 15 us */
|
||||||
+
|
|
||||||
+ r8152_led_configuration(tp);
|
+ r8152_led_configuration(tp);
|
||||||
|
+
|
||||||
|
out:
|
||||||
|
return (ret < 0) ? ret : 0;
|
||||||
}
|
}
|
||||||
|
@@ -13124,6 +13147,8 @@ static int r8153c_init(struct r8152 *tp)
|
||||||
|
|
||||||
static void r8153c_init(struct r8152 *tp)
|
tp->coalesce = 15000; /* 15 us */
|
||||||
--
|
|
||||||
2.34.8
|
|
||||||
|
|
||||||
|
+ r8152_led_configuration(tp);
|
||||||
|
+
|
||||||
|
out:
|
||||||
|
return (ret < 0) ? ret : 0;
|
||||||
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
--- a/r8152.c
|
|
||||||
+++ b/r8152.c
|
|
||||||
@@ -31,6 +31,10 @@
|
|
||||||
#include <linux/acpi.h>
|
|
||||||
#include "compatibility.h"
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
|
|
||||||
+# include <net/gso.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* Version Information */
|
|
||||||
#define DRIVER_VERSION "v2.17.1 (2023/06/13)"
|
|
||||||
#define DRIVER_AUTHOR "Realtek nic sw <nic_swsd@realtek.com>"
|
|
@ -9,7 +9,7 @@ ENV{REALTEK_MODE1}="1"
|
|||||||
ENV{REALTEK_MODE2}="3"
|
ENV{REALTEK_MODE2}="3"
|
||||||
|
|
||||||
# Realtek
|
# Realtek
|
||||||
ATTR{idVendor}=="0bda", ATTR{idProduct}=="815[2,3,5,6]", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
|
ATTR{idVendor}=="0bda", ATTR{idProduct}=="815[2,3,5,6,7]", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
|
||||||
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8053", ATTR{bcdDevice}=="e???", ATTR{bConfigurationValue}!="$env{REALTEK_MODE2}", ATTR{bConfigurationValue}="$env{REALTEK_MODE2}"
|
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8053", ATTR{bcdDevice}=="e???", ATTR{bConfigurationValue}!="$env{REALTEK_MODE2}", ATTR{bConfigurationValue}="$env{REALTEK_MODE2}"
|
||||||
|
|
||||||
# Samsung
|
# Samsung
|
||||||
|
@ -8,9 +8,17 @@ ifneq ($(KERNELRELEASE),)
|
|||||||
obj-m := r8152.o
|
obj-m := r8152.o
|
||||||
# EXTRA_CFLAGS += -DRTL8152_S5_WOL
|
# EXTRA_CFLAGS += -DRTL8152_S5_WOL
|
||||||
# EXTRA_CFLAGS += -DRTL8152_DEBUG
|
# EXTRA_CFLAGS += -DRTL8152_DEBUG
|
||||||
|
|
||||||
ifneq (,$(filter OFF off, $(CONFIG_CTAP_SHORT)))
|
ifneq (,$(filter OFF off, $(CONFIG_CTAP_SHORT)))
|
||||||
EXTRA_CFLAGS += -DCONFIG_CTAP_SHORT_OFF
|
EXTRA_CFLAGS += -DCONFIG_CTAP_SHORT_OFF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq (TRUE, $(shell test $(VERSION) -lt 5 && echo "TRUE" || \
|
||||||
|
test $(VERSION) -eq 5 && test $(PATCHLEVEL) -lt 12 && echo "TRUE"))
|
||||||
|
EXTRA_CFLAGS += -DLINUX_VERSION_MAJOR=$(VERSION)
|
||||||
|
EXTRA_CFLAGS += -DLINUX_VERSION_PATCHLEVEL=$(PATCHLEVEL)
|
||||||
|
EXTRA_CFLAGS += -DLINUX_VERSION_SUBLEVEL=$(SUBLEVEL)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
||||||
PWD :=$(shell pwd)
|
PWD :=$(shell pwd)
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
2.5G for kernel v4.10 and later
|
2.5G for kernel v4.10 and later
|
||||||
# ethtool -s eth0 autoneg on advertise 0x80000000002f
|
# ethtool -s eth0 autoneg on advertise 0x80000000002f
|
||||||
|
|
||||||
|
5G for kernel v4.10 and later (Couldn't be supported before kernel v4.10)
|
||||||
|
# ethtool -s eth0 autoneg on advertise 0x180000000002f
|
||||||
|
|
||||||
# ethtool -s eth0 autoneg on advertise 0x002f (1G)
|
# ethtool -s eth0 autoneg on advertise 0x002f (1G)
|
||||||
# ethtool -s eth0 autoneg on advertise 0x000f (100M full)
|
# ethtool -s eth0 autoneg on advertise 0x000f (100M full)
|
||||||
# ethtool -s eth0 autoneg on advertise 0x0003 (10M full)
|
# ethtool -s eth0 autoneg on advertise 0x0003 (10M full)
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#define TSO_LEGACY_MAX_SIZE 65536
|
#define TSO_LEGACY_MAX_SIZE 65536
|
||||||
#define netif_napi_add_weight netif_napi_add
|
#define netif_napi_add_weight netif_napi_add
|
||||||
#define netif_set_tso_max_size netif_set_gso_max_size
|
#define netif_set_tso_max_size netif_set_gso_max_size
|
||||||
|
#define netif_set_tso_max_segs netif_set_gso_max_segs
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
|
||||||
#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
|
||||||
@ -58,14 +60,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MDIO_EEE_2_5GT 0x0001 /* 2.5GT EEE cap */
|
#define MDIO_EEE_2_5GT 0x0001 /* 2.5GT EEE cap */
|
||||||
|
#define MDIO_EEE_5GT 0x0002 /* 5GT EEE cap */
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
|
||||||
#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */
|
#define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */
|
||||||
|
#define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */
|
||||||
#define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */
|
#define MDIO_AN_10GBT_STAT_LP2_5G 0x0020 /* LP is 2.5GBT capable */
|
||||||
|
#define MDIO_AN_10GBT_STAT_LP5G 0x0040 /* LP is 5GBT capable */
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
|
||||||
#define SPEED_2500 2500
|
#define SPEED_2500 2500
|
||||||
|
#define SPEED_5000 5000
|
||||||
#define SPEED_25000 25000
|
#define SPEED_25000 25000
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
|
||||||
#ifndef ETHTOOL_LINK_MODE_2500baseT_Full_BIT
|
#ifndef ETHTOOL_LINK_MODE_2500baseT_Full_BIT
|
||||||
@ -612,11 +618,24 @@
|
|||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) */
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) */
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,188) || LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0)
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) || LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0)
|
||||||
|
#if LINUX_VERSION_MAJOR != 4 || LINUX_VERSION_PATCHLEVEL != 19 || LINUX_VERSION_SUBLEVEL < 291
|
||||||
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
|
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
|
||||||
{
|
{
|
||||||
memcpy(dev->dev_addr, addr, 6);
|
memcpy(dev->dev_addr, addr, 6);
|
||||||
}
|
}
|
||||||
|
#endif /* LINUX_VERSION_MAJOR != 4 || LINUX_VERSION_PATCHLEVEL != 19 || LINUX_VERSION_SUBLEVEL < 291 */
|
||||||
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,4,251) || LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0) */
|
||||||
|
#endif /*LINUX_VERSION_CODE < KERNEL_VERSION(5,10,188) || LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) */
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) */
|
||||||
|
static inline void netif_set_gso_max_segs(struct net_device *dev,
|
||||||
|
unsigned int segs)
|
||||||
|
{
|
||||||
|
/* dev->gso_max_segs is read locklessly from sk_setup_caps() */
|
||||||
|
WRITE_ONCE(dev->gso_max_segs, segs);
|
||||||
|
}
|
||||||
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0) */
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) */
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
|
9096
src/r8152.c
9096
src/r8152.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user