Skip to content

Commit 7dc4532

Browse files
committed
Update to v10.015.00
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
1 parent a77d4e6 commit 7dc4532

File tree

7 files changed

+1201
-1162
lines changed

7 files changed

+1201
-1162
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
# US6,570,884, US6,115,776, and US6,327,625.
3131
################################################################################
3232

33-
CONFIG_SOC_LAN = n
34-
ENABLE_FIBER_SUPPORT = n
33+
CONFIG_SOC_LAN = y
34+
ENABLE_FIBER_SUPPORT = y
3535
ENABLE_REALWOW_SUPPORT = n
3636
ENABLE_DASH_SUPPORT = n
3737
ENABLE_DASH_PRINTER_SUPPORT = n
@@ -44,7 +44,6 @@ ENABLE_S0_MAGIC_PACKET = n
4444
ENABLE_TX_NO_CLOSE = y
4545
ENABLE_MULTIPLE_TX_QUEUE = n
4646
ENABLE_PTP_SUPPORT = n
47-
ENABLE_PTP_MASTER_MODE = n
4847
ENABLE_RSS_SUPPORT = n
4948
ENABLE_LIB_SUPPORT = n
5049
ENABLE_USE_FIRMWARE_FILE = n
@@ -53,6 +52,7 @@ DISABLE_MULTI_MSIX_VECTOR = n
5352
ENABLE_DOUBLE_VLAN = n
5453
ENABLE_PAGE_REUSE = n
5554
ENABLE_RX_PACKET_FRAGMENT = n
55+
ENABLE_GIGA_LITE = y
5656

5757
ifneq ($(KERNELRELEASE),)
5858
obj-m := r8126.o
@@ -106,9 +106,6 @@ ifneq ($(KERNELRELEASE),)
106106
r8126-objs += r8126_ptp.o
107107
EXTRA_CFLAGS += -DENABLE_PTP_SUPPORT
108108
endif
109-
ifeq ($(ENABLE_PTP_MASTER_MODE), y)
110-
EXTRA_CFLAGS += -DENABLE_PTP_MASTER_MODE
111-
endif
112109
ifeq ($(ENABLE_RSS_SUPPORT), y)
113110
r8126-objs += r8126_rss.o
114111
EXTRA_CFLAGS += -DENABLE_RSS_SUPPORT
@@ -136,6 +133,9 @@ ifneq ($(KERNELRELEASE),)
136133
ifeq ($(ENABLE_RX_PACKET_FRAGMENT), y)
137134
EXTRA_CFLAGS += -DENABLE_RX_PACKET_FRAGMENT
138135
endif
136+
ifeq ($(ENABLE_GIGA_LITE), y)
137+
EXTRA_CFLAGS += -DENABLE_GIGA_LITE
138+
endif
139139
else
140140
BASEDIR := /lib/modules/$(shell uname -r)
141141
KERNELDIR ?= $(BASEDIR)/build

r8126.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,18 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue,
203203
static inline void netdev_tx_reset_queue(struct netdev_queue *q) {}
204204
#endif
205205

206+
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
207+
static inline void fsleep(unsigned long usecs)
208+
{
209+
if (usecs <= 10)
210+
udelay(usecs);
211+
else if (usecs <= 20000)
212+
usleep_range(usecs, 2 * usecs);
213+
else
214+
msleep(DIV_ROUND_UP(usecs, 1000));
215+
}
216+
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */
217+
206218
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)
207219
#define netdev_xmit_more() (0)
208220
#endif
@@ -619,7 +631,7 @@ static inline u32 rtl8126_ethtool_adv_to_mmd_eee_adv_cap2_t(u32 adv)
619631
#define RSS_SUFFIX ""
620632
#endif
621633

622-
#define RTL8126_VERSION "10.014.01" NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX
634+
#define RTL8126_VERSION "10.015.00" NAPI_SUFFIX DASH_SUFFIX REALWOW_SUFFIX PTP_SUFFIX RSS_SUFFIX
623635
#define MODULENAME "r8126"
624636
#define PFX MODULENAME ": "
625637

@@ -1637,6 +1649,7 @@ enum RTL8126_register_content {
16371649
RxBufEmpty = 0x01,
16381650

16391651
/* Cfg9346Bits */
1652+
Cfg9346_EEM_MASK = 0xC0,
16401653
Cfg9346_Lock = 0x00,
16411654
Cfg9346_Unlock = 0xC0,
16421655
Cfg9346_EEDO = (1 << 0),
@@ -1730,8 +1743,11 @@ enum RTL8126_register_content {
17301743

17311744
/* rtl8126_PHYstatus */
17321745
PowerSaveStatus = 0x80,
1746+
_1000bpsL = 0x80000,
17331747
_5000bpsF = 0x1000,
1748+
_5000bpsL = 0x800,
17341749
_2500bpsF = 0x400,
1750+
_2500bpsL = 0x200,
17351751
TxFlowCtrl = 0x40,
17361752
RxFlowCtrl = 0x20,
17371753
_1000bpsF = 0x10,
@@ -2169,6 +2185,7 @@ enum r8126_flag {
21692185
R8126_FLAG_TASK_RESET_PENDING,
21702186
R8126_FLAG_TASK_ESD_CHECK_PENDING,
21712187
R8126_FLAG_TASK_LINKCHG_CHECK_PENDING,
2188+
R8126_FLAG_TASK_LINK_CHECK_PENDING,
21722189
R8126_FLAG_MAX
21732190
};
21742191

@@ -2579,10 +2596,12 @@ struct rtl8126_private {
25792596
struct work_struct reset_task;
25802597
struct work_struct esd_task;
25812598
struct work_struct linkchg_task;
2599+
struct work_struct link_task;
25822600
#else
25832601
struct delayed_work reset_task;
25842602
struct delayed_work esd_task;
25852603
struct delayed_work linkchg_task;
2604+
struct delayed_work link_task;
25862605
#endif
25872606
DECLARE_BITMAP(task_flags, R8126_FLAG_MAX);
25882607
unsigned features;
@@ -2777,7 +2796,6 @@ struct rtl8126_private {
27772796

27782797
u8 HwSuppPtpVer;
27792798
u8 EnablePtp;
2780-
u8 ptp_master_mode;
27812799
#ifdef ENABLE_PTP_SUPPORT
27822800
u32 tx_hwtstamp_timeouts;
27832801
u32 tx_hwtstamp_skipped;
@@ -2805,6 +2823,8 @@ struct rtl8126_private {
28052823

28062824
u8 HwSuppMacMcuVer;
28072825
u16 MacMcuPageSize;
2826+
u64 hw_mcu_patch_code_ver;
2827+
u64 bin_mcu_patch_code_ver;
28082828

28092829
u8 HwSuppTcamVer;
28102830

0 commit comments

Comments
 (0)