Merge branch 'openwrt:master' into master
This commit is contained in:
commit
5daa7071fa
165 changed files with 4284 additions and 3075 deletions
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-5.15 = .120
|
LINUX_VERSION-5.15 = .123
|
||||||
LINUX_KERNEL_HASH-5.15.120 = 6499089eae6b271063cb3e873ab7f4ba0543cfb21dcc9c54d9bcf5357db683f6
|
LINUX_KERNEL_HASH-5.15.123 = 2de69544a12e6a059163c58fc901c13bcf22e8cac39c66b56f8fbb633399bf93
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-6.1 = .41
|
LINUX_VERSION-6.1 = .42
|
||||||
LINUX_KERNEL_HASH-6.1.41 = 312809a78eea052a08a6580f47b2ed8dd28e5633461d6731febaf3cb1e570bb7
|
LINUX_KERNEL_HASH-6.1.42 = aaf8261b551c8b76b81eab8780b446e88cea4d551ae517ac3a9b2dbdbd381ed3
|
||||||
|
|
|
@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
|
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
|
||||||
PKG_SOURCE_DATE:=2023-07-24
|
PKG_SOURCE_DATE:=2023-07-24
|
||||||
PKG_SOURCE_VERSION:=00ac6db375b76e57e1f5e9e9bffa033e907c3581
|
PKG_SOURCE_VERSION:=00ac6db375b76e57e1f5e9e9bffa033e907c3581
|
||||||
PKG_MIRROR_HASH:=35e84b2160a7ddc083439e469d7366bb4e6098fc43b5616e68f001364eb05835
|
PKG_MIRROR_HASH:=74fc18395532c4292f530da8d00fa1873ada4e05e600c0077a7b7f85ace0d913
|
||||||
|
|
||||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
From 4bd66fd5b69eda41b4320fd6f8db50a7b7fa7bf7 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <4bd66fd5b69eda41b4320fd6f8db50a7b7fa7bf7.1690828424.git.daniel@makrotopia.org>
|
||||||
|
From: Daniel Golle <daniel@makrotopia.org>
|
||||||
|
Date: Mon, 31 Jul 2023 19:25:04 +0100
|
||||||
|
Subject: [PATCH] ram: mediatek: include <linux/sizes.h> for SZ_* macros
|
||||||
|
To: Ryder Lee <ryder.lee@mediatek.com>,
|
||||||
|
Weijie Gao <weijie.gao@mediatek.com>,
|
||||||
|
Chunfeng Yun <chunfeng.yun@mediatek.com>,
|
||||||
|
GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
|
||||||
|
u-boot@lists.denx.de
|
||||||
|
|
||||||
|
Something between U-Boot 2023.04 and 2023.07.02 resulted in no longer
|
||||||
|
implicitely including <linux/sizes.h> in the DDR3 RAM driver for the
|
||||||
|
MT7929 SoC. The result is a build failure:
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c: In function 'mtk_ddr3_get_info':
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c:734:30: error: 'SZ_128M' undeclared (first use in this function)
|
||||||
|
734 | info->size = SZ_128M;
|
||||||
|
| ^~~~~~~
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c:734:30: note: each undeclared identifier is reported only once for each function it appears in
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c:737:30: error: 'SZ_256M' undeclared (first use in this function)
|
||||||
|
737 | info->size = SZ_256M;
|
||||||
|
| ^~~~~~~
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c:740:30: error: 'SZ_512M' undeclared (first use in this function)
|
||||||
|
740 | info->size = SZ_512M;
|
||||||
|
| ^~~~~~~
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c:743:30: error: 'SZ_1G' undeclared (first use in this function)
|
||||||
|
743 | info->size = SZ_1G;
|
||||||
|
| ^~~~~
|
||||||
|
|
||||||
|
Include <linux/sizes.h> so SZ_* is defined.
|
||||||
|
|
||||||
|
Reported-by: Tianling Shen <cnsztl@immortalwrt.org>
|
||||||
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
|
---
|
||||||
|
drivers/ram/mediatek/ddr3-mt7629.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/drivers/ram/mediatek/ddr3-mt7629.c
|
||||||
|
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
|
||||||
|
@@ -14,6 +14,7 @@
|
||||||
|
#include <asm/io.h>
|
||||||
|
#include <linux/bitops.h>
|
||||||
|
#include <linux/delay.h>
|
||||||
|
+#include <linux/sizes.h>
|
||||||
|
|
||||||
|
/* EMI */
|
||||||
|
#define EMI_CONA 0x000
|
|
@ -150,7 +150,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7622-ubnt-unifi-6-lr.dts
|
+++ b/arch/arm/dts/mt7622-ubnt-unifi-6-lr.dts
|
||||||
@@ -0,0 +1,188 @@
|
@@ -0,0 +1,193 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2019 MediaTek Inc.
|
+ * Copyright (c) 2019 MediaTek Inc.
|
||||||
|
@ -173,6 +173,11 @@
|
||||||
+ tick-timer = &timer0;
|
+ tick-timer = &timer0;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x20000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ aliases {
|
+ aliases {
|
||||||
+ spi0 = &snor;
|
+ spi0 = &snor;
|
||||||
+ };
|
+ };
|
||||||
|
|
|
@ -182,7 +182,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7986a-xiaomi_redmi-ax6000.dts
|
+++ b/arch/arm/dts/mt7986a-xiaomi_redmi-ax6000.dts
|
||||||
@@ -0,0 +1,156 @@
|
@@ -0,0 +1,161 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2021 MediaTek Inc.
|
+ * Copyright (c) 2021 MediaTek Inc.
|
||||||
|
@ -205,6 +205,11 @@
|
||||||
+ tick-timer = &timer0;
|
+ tick-timer = &timer0;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x20000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ keys {
|
+ keys {
|
||||||
+ compatible = "gpio-keys";
|
+ compatible = "gpio-keys";
|
||||||
+ factory {
|
+ factory {
|
||||||
|
|
|
@ -555,7 +555,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7986a-tplink-tl-xdr608x.dts
|
+++ b/arch/arm/dts/mt7986a-tplink-tl-xdr608x.dts
|
||||||
@@ -0,0 +1,191 @@
|
@@ -0,0 +1,196 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2021 MediaTek Inc.
|
+ * Copyright (c) 2021 MediaTek Inc.
|
||||||
|
@ -578,6 +578,11 @@
|
||||||
+ tick-timer = &timer0;
|
+ tick-timer = &timer0;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x20000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ keys {
|
+ keys {
|
||||||
+ compatible = "gpio-keys";
|
+ compatible = "gpio-keys";
|
||||||
+
|
+
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7981_qihoo-360t7.dts
|
+++ b/arch/arm/dts/mt7981_qihoo-360t7.dts
|
||||||
@@ -0,0 +1,180 @@
|
@@ -0,0 +1,185 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2022 MediaTek Inc.
|
+ * Copyright (c) 2022 MediaTek Inc.
|
||||||
|
@ -201,6 +201,11 @@
|
||||||
+ tick-timer = &timer0;
|
+ tick-timer = &timer0;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x10000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ keys {
|
+ keys {
|
||||||
+ compatible = "gpio-keys";
|
+ compatible = "gpio-keys";
|
||||||
+
|
+
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7981_xiaomi_mi-router-wr30u.dts
|
+++ b/arch/arm/dts/mt7981_xiaomi_mi-router-wr30u.dts
|
||||||
@@ -0,0 +1,216 @@
|
@@ -0,0 +1,221 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2022 MediaTek Inc.
|
+ * Copyright (c) 2022 MediaTek Inc.
|
||||||
|
@ -206,6 +206,11 @@
|
||||||
+ system_led = "yellow:system";
|
+ system_led = "yellow:system";
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x10000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ gpio-keys {
|
+ gpio-keys {
|
||||||
+ compatible = "gpio-keys";
|
+ compatible = "gpio-keys";
|
||||||
+
|
+
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
+CONFIG_SERVERIP="192.168.1.254"
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/dts/mt7981_h3c_magic-nx30-pro.dts
|
+++ b/arch/arm/dts/mt7981_h3c_magic-nx30-pro.dts
|
||||||
@@ -0,0 +1,200 @@
|
@@ -0,0 +1,205 @@
|
||||||
+// SPDX-License-Identifier: GPL-2.0
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2022 MediaTek Inc.
|
+ * Copyright (c) 2022 MediaTek Inc.
|
||||||
|
@ -201,6 +201,11 @@
|
||||||
+ tick-timer = &timer0;
|
+ tick-timer = &timer0;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
|
+ memory@40000000 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x40000000 0x10000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
+ keys {
|
+ keys {
|
||||||
+ compatible = "gpio-keys";
|
+ compatible = "gpio-keys";
|
||||||
+
|
+
|
||||||
|
|
|
@ -972,6 +972,18 @@ endef
|
||||||
$(eval $(call KernelPackage,sched-red))
|
$(eval $(call KernelPackage,sched-red))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/sched-skbprio
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=SKB priority queue scheduler (SKBPRIO)
|
||||||
|
DEPENDS:=+kmod-sched-core
|
||||||
|
KCONFIG:= CONFIG_NET_SCH_SKBPRIO
|
||||||
|
FILES:= $(LINUX_DIR)/net/sched/sch_skbprio.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,sch_skbprio)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sched-skbprio))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/bpf-test
|
define KernelPackage/bpf-test
|
||||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
TITLE:=Test Berkeley Packet Filter functionality
|
TITLE:=Test Berkeley Packet Filter functionality
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
From e8f10b21abd8ae440632f561f8b65f37b4b55cc8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 30 Jul 2023 11:16:32 +0200
|
||||||
|
Subject: [PATCH 1/5] os_dep/osdep_service: use new get_random_u32
|
||||||
|
|
||||||
|
Drop prandom_u32 as got deprecated for get_random_u32.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
os_dep/osdep_service.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/os_dep/osdep_service.c
|
||||||
|
+++ b/os_dep/osdep_service.c
|
||||||
|
@@ -2335,7 +2335,9 @@ u64 rtw_division64(u64 x, u64 y)
|
||||||
|
inline u32 rtw_random32(void)
|
||||||
|
{
|
||||||
|
#ifdef PLATFORM_LINUX
|
||||||
|
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
|
||||||
|
+ return get_random_u32();
|
||||||
|
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
|
||||||
|
return prandom_u32();
|
||||||
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18))
|
||||||
|
u32 random_int;
|
|
@ -0,0 +1,72 @@
|
||||||
|
From dc4024894c9deefc56f8dd6b2d2822b277f268a5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 30 Jul 2023 11:18:48 +0200
|
||||||
|
Subject: [PATCH 2/5] treewide: fix always TRUE condition warning
|
||||||
|
|
||||||
|
Fix always TRUE condition warning an drop redundant check.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
core/rtw_sta_mgt.c | 3 +--
|
||||||
|
hal/OUTSRC/phydm_debug.c | 16 ++++++----------
|
||||||
|
os_dep/linux/ioctl_cfg80211.c | 3 +--
|
||||||
|
3 files changed, 8 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
--- a/core/rtw_sta_mgt.c
|
||||||
|
+++ b/core/rtw_sta_mgt.c
|
||||||
|
@@ -207,8 +207,7 @@ void rtw_mfree_stainfo(struct sta_info *
|
||||||
|
{
|
||||||
|
_func_enter_;
|
||||||
|
|
||||||
|
- if(&psta->lock != NULL)
|
||||||
|
- _rtw_spinlock_free(&psta->lock);
|
||||||
|
+ _rtw_spinlock_free(&psta->lock);
|
||||||
|
|
||||||
|
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
|
||||||
|
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
|
||||||
|
--- a/hal/OUTSRC/phydm_debug.c
|
||||||
|
+++ b/hal/OUTSRC/phydm_debug.c
|
||||||
|
@@ -870,12 +870,10 @@ phydm_cmd_parser(
|
||||||
|
case PHYDM_RA:
|
||||||
|
|
||||||
|
for(i=0; i<5; i++) {
|
||||||
|
- if(input[i+1]) {
|
||||||
|
- PHYDM_SSCANF(input[i+1], DCMD_DECIMAL, &var1[i]);
|
||||||
|
+ PHYDM_SSCANF(input[i+1], DCMD_DECIMAL, &var1[i]);
|
||||||
|
|
||||||
|
- PHYDM_SNPRINTF((output+used, out_len-used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));
|
||||||
|
- input_idx++;
|
||||||
|
- }
|
||||||
|
+ PHYDM_SNPRINTF((output+used, out_len-used, "new SET, RA_var[%d]= (( %d ))\n", i , var1[i]));
|
||||||
|
+ input_idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(input_idx>=1) {
|
||||||
|
@@ -891,12 +889,10 @@ phydm_cmd_parser(
|
||||||
|
case PHYDM_PATHDIV:
|
||||||
|
|
||||||
|
for(i=0; i<5; i++) {
|
||||||
|
- if(input[i+1]) {
|
||||||
|
- PHYDM_SSCANF(input[i+1], DCMD_HEX, &var1[i]);
|
||||||
|
+ PHYDM_SSCANF(input[i+1], DCMD_HEX, &var1[i]);
|
||||||
|
|
||||||
|
- PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));
|
||||||
|
- input_idx++;
|
||||||
|
- }
|
||||||
|
+ PHYDM_SNPRINTF((output+used, out_len-used, "new SET, PATHDIV_var[%d]= (( %d ))\n", i , var1[i]));
|
||||||
|
+ input_idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(input_idx>=1) {
|
||||||
|
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||||
|
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||||
|
@@ -2170,8 +2170,7 @@ static int cfg80211_rtw_scan(struct wiph
|
||||||
|
|
||||||
|
#ifdef CONFIG_P2P
|
||||||
|
if( pwdinfo->driver_interface == DRIVER_CFG80211 ) {
|
||||||
|
- if(ssids->ssid != NULL
|
||||||
|
- && _rtw_memcmp(ssids->ssid, "DIRECT-", 7)
|
||||||
|
+ if(_rtw_memcmp(ssids->ssid, "DIRECT-", 7)
|
||||||
|
&& rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL)
|
||||||
|
) {
|
||||||
|
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
|
|
@ -0,0 +1,93 @@
|
||||||
|
From 5f3bb5602615894cda88ca1b44fdfafdfb01c8c8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 30 Jul 2023 11:20:39 +0200
|
||||||
|
Subject: [PATCH 3/5] treewide: use correct type for tasklet_init
|
||||||
|
|
||||||
|
Update and use correct type for tasklet_init to fix compilation error
|
||||||
|
for not valid cast.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
hal/hal_hci/hal_usb.c | 2 +-
|
||||||
|
hal/rtl8812a/usb/rtl8812au_xmit.c | 2 +-
|
||||||
|
hal/rtl8812a/usb/usb_ops_linux.c | 2 +-
|
||||||
|
include/rtl8812a_xmit.h | 2 +-
|
||||||
|
include/usb_ops_linux.h | 2 +-
|
||||||
|
os_dep/linux/usb_ops_linux.c | 4 ++--
|
||||||
|
6 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
--- a/hal/hal_hci/hal_usb.c
|
||||||
|
+++ b/hal/hal_hci/hal_usb.c
|
||||||
|
@@ -35,7 +35,7 @@ int usb_init_recv_priv(_adapter *padapte
|
||||||
|
|
||||||
|
#ifdef PLATFORM_LINUX
|
||||||
|
tasklet_init(&precvpriv->recv_tasklet,
|
||||||
|
- (void(*)(unsigned long))usb_recv_tasklet,
|
||||||
|
+ usb_recv_tasklet,
|
||||||
|
(unsigned long)padapter);
|
||||||
|
#endif /* PLATFORM_LINUX */
|
||||||
|
|
||||||
|
--- a/hal/rtl8812a/usb/rtl8812au_xmit.c
|
||||||
|
+++ b/hal/rtl8812a/usb/rtl8812au_xmit.c
|
||||||
|
@@ -30,7 +30,7 @@ s32 rtl8812au_init_xmit_priv(_adapter *p
|
||||||
|
|
||||||
|
#ifdef PLATFORM_LINUX
|
||||||
|
tasklet_init(&pxmitpriv->xmit_tasklet,
|
||||||
|
- (void(*)(unsigned long))rtl8812au_xmit_tasklet,
|
||||||
|
+ rtl8812au_xmit_tasklet,
|
||||||
|
(unsigned long)padapter);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_TX_EARLY_MODE
|
||||||
|
--- a/hal/rtl8812a/usb/usb_ops_linux.c
|
||||||
|
+++ b/hal/rtl8812a/usb/usb_ops_linux.c
|
||||||
|
@@ -475,7 +475,7 @@ _exit_recvbuf2recvframe:
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-void rtl8812au_xmit_tasklet(void *priv)
|
||||||
|
+void rtl8812au_xmit_tasklet(unsigned long priv)
|
||||||
|
{
|
||||||
|
int ret = _FALSE;
|
||||||
|
_adapter *padapter = (_adapter*)priv;
|
||||||
|
--- a/include/rtl8812a_xmit.h
|
||||||
|
+++ b/include/rtl8812a_xmit.h
|
||||||
|
@@ -331,7 +331,7 @@ s32 rtl8812au_hal_xmit(PADAPTER padapter
|
||||||
|
s32 rtl8812au_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
|
||||||
|
s32 rtl8812au_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
|
s32 rtl8812au_xmit_buf_handler(PADAPTER padapter);
|
||||||
|
-void rtl8812au_xmit_tasklet(void *priv);
|
||||||
|
+void rtl8812au_xmit_tasklet(unsigned long priv);
|
||||||
|
s32 rtl8812au_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/include/usb_ops_linux.h
|
||||||
|
+++ b/include/usb_ops_linux.h
|
||||||
|
@@ -78,7 +78,7 @@ int usb_write16(struct intf_hdl *pintfhd
|
||||||
|
int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||||
|
int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
|
||||||
|
u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
||||||
|
-void usb_recv_tasklet(void *priv);
|
||||||
|
+void usb_recv_tasklet(unsigned long priv);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/os_dep/linux/usb_ops_linux.c
|
||||||
|
+++ b/os_dep/linux/usb_ops_linux.c
|
||||||
|
@@ -717,7 +717,7 @@ void usb_init_recvbuf(_adapter *padapter
|
||||||
|
int recvbuf2recvframe(PADAPTER padapter, void *ptr);
|
||||||
|
|
||||||
|
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||||
|
-void usb_recv_tasklet(void *priv)
|
||||||
|
+void usb_recv_tasklet(unsigned long priv)
|
||||||
|
{
|
||||||
|
struct recv_buf *precvbuf = NULL;
|
||||||
|
_adapter *padapter = (_adapter*)priv;
|
||||||
|
@@ -870,7 +870,7 @@ u32 usb_read_port(struct intf_hdl *pintf
|
||||||
|
}
|
||||||
|
#else // CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||||
|
|
||||||
|
-void usb_recv_tasklet(void *priv)
|
||||||
|
+void usb_recv_tasklet(unsigned long priv)
|
||||||
|
{
|
||||||
|
_pkt *pskb;
|
||||||
|
_adapter *padapter = (_adapter*)priv;
|
|
@ -0,0 +1,56 @@
|
||||||
|
From 51ab9d6a959de87206731f941b1df39e5c5d63ea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 30 Jul 2023 11:21:49 +0200
|
||||||
|
Subject: [PATCH 4/5] treewide: drop const from dev_addr
|
||||||
|
|
||||||
|
dev_addr is not const and conflict with memcpy function. Fix compilation
|
||||||
|
warning by casting dev_addr to void*.
|
||||||
|
|
||||||
|
This operation is safe as this is done before netdev register.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
os_dep/linux/os_intfs.c | 6 +++---
|
||||||
|
os_dep/osdep_service.c | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/os_dep/linux/os_intfs.c
|
||||||
|
+++ b/os_dep/linux/os_intfs.c
|
||||||
|
@@ -1885,7 +1885,7 @@ int _netdev_if2_open(struct net_device *
|
||||||
|
|
||||||
|
_rtw_memcpy(padapter->eeprompriv.mac_addr, mac, ETH_ALEN);
|
||||||
|
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
||||||
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
}
|
||||||
|
#endif //CONFIG_PLATFORM_INTEL_BYT
|
||||||
|
|
||||||
|
@@ -2254,7 +2254,7 @@ static int _rtw_drv_register_netdev(_ada
|
||||||
|
/* alloc netdev name */
|
||||||
|
rtw_init_netdev_name(pnetdev, name);
|
||||||
|
|
||||||
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
|
/* Tell the network stack we exist */
|
||||||
|
if (register_netdev(pnetdev) != 0) {
|
||||||
|
@@ -2334,7 +2334,7 @@ int _netdev_open(struct net_device *pnet
|
||||||
|
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
||||||
|
rtw_macaddr_cfg(padapter->eeprompriv.mac_addr);
|
||||||
|
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
||||||
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
#endif //CONFIG_PLATFORM_INTEL_BYT
|
||||||
|
|
||||||
|
padapter->bDriverStopped = _FALSE;
|
||||||
|
--- a/os_dep/osdep_service.c
|
||||||
|
+++ b/os_dep/osdep_service.c
|
||||||
|
@@ -2209,7 +2209,7 @@ int rtw_change_ifname(_adapter *padapter
|
||||||
|
|
||||||
|
rtw_init_netdev_name(pnetdev, ifname);
|
||||||
|
|
||||||
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||||
|
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
|
||||||
|
if(!rtnl_is_locked())
|
|
@ -0,0 +1,26 @@
|
||||||
|
From f455198acaa71c2963746a6b17c878c7d1d0e331 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
Date: Sun, 30 Jul 2023 11:22:58 +0200
|
||||||
|
Subject: [PATCH 5/5] os_dep/linux/proc: move to pde_data function
|
||||||
|
|
||||||
|
PDE_DATA macro was dropped in 5.17 with the new pde_data that does the
|
||||||
|
exact thing. Fix compilation error and use new function.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||||
|
---
|
||||||
|
os_dep/linux/rtw_proc.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/os_dep/linux/rtw_proc.c
|
||||||
|
+++ b/os_dep/linux/rtw_proc.c
|
||||||
|
@@ -37,6 +37,10 @@ inline struct proc_dir_entry *get_rtw_dr
|
||||||
|
#define file_inode(file) ((file)->f_dentry->d_inode)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+#define PDE_DATA(inode) pde_data(inode)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0))
|
||||||
|
#define PDE_DATA(inode) PDE((inode))->data
|
||||||
|
#define proc_get_parent_data(inode) PDE((inode))->parent->data
|
|
@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
|
||||||
PKG_SOURCE_DATE:=2023-07-25
|
PKG_SOURCE_DATE:=2023-07-25
|
||||||
PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4
|
PKG_SOURCE_VERSION:=7aefb47be57df0467d97d539f7fe9e23e607a3b4
|
||||||
PKG_MIRROR_HASH:=941e4298acc9a0c9b485b9ad706bb11c4d0bc7a66eec22e569b430ab38a9f5fc
|
PKG_MIRROR_HASH:=427d4228fd65cf4320b8c212e710b86bcbfcdd4239f4e67132b3b471f7437202
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
|
PKG_LICENSE:=GPL-2.0 BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=
|
PKG_LICENSE_FILES:=
|
||||||
|
|
|
@ -750,7 +750,7 @@ SVN-Revision: 35130
|
||||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||||
--- a/net/ipv4/tcp_input.c
|
--- a/net/ipv4/tcp_input.c
|
||||||
+++ b/net/ipv4/tcp_input.c
|
+++ b/net/ipv4/tcp_input.c
|
||||||
@@ -4152,14 +4152,16 @@ static bool tcp_parse_aligned_timestamp(
|
@@ -4158,14 +4158,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||||
{
|
{
|
||||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||||
|
|
||||||
@@ -1367,6 +1370,9 @@
|
@@ -1368,6 +1371,9 @@
|
||||||
#define USB_VENDOR_ID_XIAOMI 0x2717
|
#define USB_VENDOR_ID_XIAOMI 0x2717
|
||||||
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
#define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||||
@@ -197,6 +198,7 @@ static const struct hid_device_id hid_qu
|
@@ -198,6 +199,7 @@ static const struct hid_device_id hid_qu
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_GROUP_AUDIO), HID_QUIRK_NOGET },
|
||||||
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||||
|
|
||||||
--- a/net/bluetooth/hci_sync.c
|
--- a/net/bluetooth/hci_sync.c
|
||||||
+++ b/net/bluetooth/hci_sync.c
|
+++ b/net/bluetooth/hci_sync.c
|
||||||
@@ -4540,6 +4540,7 @@ static const struct {
|
@@ -4635,6 +4635,7 @@ static const struct {
|
||||||
*/
|
*/
|
||||||
static int hci_dev_setup_sync(struct hci_dev *hdev)
|
static int hci_dev_setup_sync(struct hci_dev *hdev)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool invalid_bdaddr;
|
bool invalid_bdaddr;
|
||||||
size_t i;
|
size_t i;
|
||||||
@@ -4568,7 +4569,9 @@ static int hci_dev_setup_sync(struct hci
|
@@ -4663,7 +4664,9 @@ static int hci_dev_setup_sync(struct hci
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) &&
|
if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) &&
|
||||||
|
|
|
@ -5,7 +5,7 @@ when a switch driver is in use.
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/broadcom/tg3.c
|
--- a/drivers/net/ethernet/broadcom/tg3.c
|
||||||
+++ b/drivers/net/ethernet/broadcom/tg3.c
|
+++ b/drivers/net/ethernet/broadcom/tg3.c
|
||||||
@@ -4267,7 +4267,8 @@ static int tg3_power_down_prepare(struct
|
@@ -4268,7 +4268,8 @@ static int tg3_power_down_prepare(struct
|
||||||
static void tg3_power_down(struct tg3 *tp)
|
static void tg3_power_down(struct tg3 *tp)
|
||||||
{
|
{
|
||||||
pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
|
pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
|
||||||
|
|
|
@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
@@ -720,6 +720,8 @@ static int bcm4908_enet_probe(struct pla
|
@@ -720,6 +720,8 @@ static int bcm4908_enet_probe(struct pla
|
||||||
|
|
||||||
SET_NETDEV_DEV(netdev, &pdev->dev);
|
SET_NETDEV_DEV(netdev, &pdev->dev);
|
||||||
err = of_get_mac_address(dev->of_node, netdev->dev_addr);
|
err = of_get_ethdev_address(dev->of_node, netdev);
|
||||||
+ if (err == -EPROBE_DEFER)
|
+ if (err == -EPROBE_DEFER)
|
||||||
+ goto err_dma_free;
|
+ goto err_dma_free;
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
@ -460,7 +460,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -558,24 +390,4 @@
|
@@ -557,24 +389,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
From d3c8e2c5757153bbfad70019ec1decbca86f3def Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
||||||
Date: Wed, 3 May 2023 14:28:30 +0200
|
|
||||||
Subject: [PATCH] ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
There is no such property in the SPI controller binding documentation.
|
|
||||||
Also Linux driver doesn't look for it.
|
|
||||||
|
|
||||||
This fixes:
|
|
||||||
arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: spi@18029200: Unevaluated properties are not allowed ('clock-names' was unexpected)
|
|
||||||
From schema: Documentation/devicetree/bindings/spi/brcm,spi-bcm-qspi.yaml
|
|
||||||
|
|
||||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
||||||
Link: https://lore.kernel.org/r/20230503122830.3200-1-zajec5@gmail.com
|
|
||||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
||||||
---
|
|
||||||
arch/arm/boot/dts/bcm5301x.dtsi | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/arch/arm/boot/dts/bcm5301x.dtsi
|
|
||||||
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
|
|
||||||
@@ -335,7 +335,6 @@
|
|
||||||
"spi_lr_session_done",
|
|
||||||
"spi_lr_overread";
|
|
||||||
clocks = <&iprocmed>;
|
|
||||||
- clock-names = "iprocmed";
|
|
||||||
num-cs = <2>;
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
|
@ -1,44 +0,0 @@
|
||||||
From fd274b733bfdde3ca72f0fa2a37f032f3a8c402c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
Date: Thu, 8 Jun 2023 17:36:29 +0200
|
|
||||||
Subject: [PATCH] ARM: dts: BCM5301X: fix duplex-full => full-duplex
|
|
||||||
|
|
||||||
this typo was found by the dtbs_check
|
|
||||||
| ports:port@5:fixed-link: 'oneOf' conditional failed,
|
|
||||||
| {'speed': [[1000]], 'duplex-full': True} is not of type 'array'
|
|
||||||
| 'duplex-full' does not match any of the regexes: 'pinctrl-[0-]..."
|
|
||||||
|
|
||||||
this should have been full-duplex;
|
|
||||||
|
|
||||||
Fixes: 935327a73553 ("ARM: dts: BCM5301X: Add DT for Meraki MR26")
|
|
||||||
Fixes: ec88a9c344d9 ("ARM: BCM5301X: Add DT for Meraki MR32")
|
|
||||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
Link: https://lore.kernel.org/r/50522f45566951a9eabd22820647924cc6b4a264.1686238550.git.chunkeey@gmail.com
|
|
||||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
|
||||||
---
|
|
||||||
arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 2 +-
|
|
||||||
arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
|
|
||||||
+++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
|
|
||||||
@@ -121,7 +121,7 @@
|
|
||||||
|
|
||||||
fixed-link {
|
|
||||||
speed = <1000>;
|
|
||||||
- duplex-full;
|
|
||||||
+ full-duplex;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
|
|
||||||
+++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
|
|
||||||
@@ -182,7 +182,7 @@
|
|
||||||
|
|
||||||
fixed-link {
|
|
||||||
speed = <1000>;
|
|
||||||
- duplex-full;
|
|
||||||
+ full-duplex;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -127,11 +127,11 @@ it on BCM4708 family.
|
||||||
/*
|
/*
|
||||||
--- a/drivers/usb/host/xhci.h
|
--- a/drivers/usb/host/xhci.h
|
||||||
+++ b/drivers/usb/host/xhci.h
|
+++ b/drivers/usb/host/xhci.h
|
||||||
@@ -1906,6 +1906,7 @@ struct xhci_hcd {
|
@@ -1908,6 +1908,7 @@ struct xhci_hcd {
|
||||||
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42)
|
|
||||||
#define XHCI_SUSPEND_RESUME_CLKS BIT_ULL(43)
|
|
||||||
#define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
|
#define XHCI_RESET_TO_DEFAULT BIT_ULL(44)
|
||||||
+#define XHCI_FAKE_DOORBELL BIT_ULL(45)
|
#define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45)
|
||||||
|
#define XHCI_ZHAOXIN_HOST BIT_ULL(46)
|
||||||
|
+#define XHCI_FAKE_DOORBELL BIT_ULL(47)
|
||||||
|
|
||||||
unsigned int num_active_eps;
|
unsigned int num_active_eps;
|
||||||
unsigned int limit_active_eps;
|
unsigned int limit_active_eps;
|
||||||
|
|
|
@ -53,7 +53,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
map->format.format_write(map, reg, val);
|
map->format.format_write(map, reg, val);
|
||||||
|
|
||||||
trace_regmap_hw_write_start(map, reg, 1);
|
trace_regmap_hw_write_start(map, reg, 1);
|
||||||
@@ -2348,6 +2351,7 @@ static int _regmap_raw_multi_reg_write(s
|
@@ -2346,6 +2349,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||||
unsigned int reg = regs[i].reg;
|
unsigned int reg = regs[i].reg;
|
||||||
unsigned int val = regs[i].def;
|
unsigned int val = regs[i].def;
|
||||||
trace_regmap_hw_write_start(map, reg, 1);
|
trace_regmap_hw_write_start(map, reg, 1);
|
||||||
|
@ -61,7 +61,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
map->format.format_reg(u8, reg, map->reg_shift);
|
map->format.format_reg(u8, reg, map->reg_shift);
|
||||||
u8 += reg_bytes + pad_bytes;
|
u8 += reg_bytes + pad_bytes;
|
||||||
map->format.format_val(u8, val, 0);
|
map->format.format_val(u8, val, 0);
|
||||||
@@ -2675,6 +2679,7 @@ static int _regmap_raw_read(struct regma
|
@@ -2673,6 +2677,7 @@ static int _regmap_raw_read(struct regma
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
reg >>= map->format.reg_downshift;
|
reg >>= map->format.reg_downshift;
|
||||||
map->format.format_write(map, reg, val);
|
map->format.format_write(map, reg, val);
|
||||||
|
|
||||||
@@ -2351,6 +2355,7 @@ static int _regmap_raw_multi_reg_write(s
|
@@ -2349,6 +2353,7 @@ static int _regmap_raw_multi_reg_write(s
|
||||||
unsigned int reg = regs[i].reg;
|
unsigned int reg = regs[i].reg;
|
||||||
unsigned int val = regs[i].def;
|
unsigned int val = regs[i].def;
|
||||||
trace_regmap_hw_write_start(map, reg, 1);
|
trace_regmap_hw_write_start(map, reg, 1);
|
||||||
|
@ -66,7 +66,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
reg >>= map->format.reg_downshift;
|
reg >>= map->format.reg_downshift;
|
||||||
map->format.format_reg(u8, reg, map->reg_shift);
|
map->format.format_reg(u8, reg, map->reg_shift);
|
||||||
u8 += reg_bytes + pad_bytes;
|
u8 += reg_bytes + pad_bytes;
|
||||||
@@ -2679,6 +2684,7 @@ static int _regmap_raw_read(struct regma
|
@@ -2677,6 +2682,7 @@ static int _regmap_raw_read(struct regma
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
return map->bus->reg_write(map->bus_context, reg, val);
|
return map->bus->reg_write(map->bus_context, reg, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2705,6 +2707,8 @@ static int _regmap_bus_reg_read(void *co
|
@@ -2703,6 +2705,8 @@ static int _regmap_bus_reg_read(void *co
|
||||||
{
|
{
|
||||||
struct regmap *map = context;
|
struct regmap *map = context;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||||
return map->bus->reg_read(map->bus_context, reg, val);
|
return map->bus->reg_read(map->bus_context, reg, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3080,6 +3084,8 @@ static int _regmap_update_bits(struct re
|
@@ -3078,6 +3082,8 @@ static int _regmap_update_bits(struct re
|
||||||
*change = false;
|
*change = false;
|
||||||
|
|
||||||
if (regmap_volatile(map, reg) && map->reg_update_bits) {
|
if (regmap_volatile(map, reg) && map->reg_update_bits) {
|
||||||
|
|
|
@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||||
ret = device_reset(eth->dev);
|
ret = device_reset(eth->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@@ -3079,6 +3086,35 @@ free_netdev:
|
@@ -3072,6 +3079,35 @@ free_netdev:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
static int mtk_probe(struct platform_device *pdev)
|
static int mtk_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *mac_np;
|
struct device_node *mac_np;
|
||||||
@@ -3092,6 +3128,7 @@ static int mtk_probe(struct platform_dev
|
@@ -3085,6 +3121,7 @@ static int mtk_probe(struct platform_dev
|
||||||
eth->soc = of_device_get_match_data(&pdev->dev);
|
eth->soc = of_device_get_match_data(&pdev->dev);
|
||||||
|
|
||||||
eth->dev = &pdev->dev;
|
eth->dev = &pdev->dev;
|
||||||
|
@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
eth->base = devm_platform_ioremap_resource(pdev, 0);
|
eth->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
if (IS_ERR(eth->base))
|
if (IS_ERR(eth->base))
|
||||||
return PTR_ERR(eth->base);
|
return PTR_ERR(eth->base);
|
||||||
@@ -3140,6 +3177,16 @@ static int mtk_probe(struct platform_dev
|
@@ -3133,6 +3170,16 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
static int mtk_msg_level = -1;
|
static int mtk_msg_level = -1;
|
||||||
module_param_named(msg_level, mtk_msg_level, int, 0);
|
module_param_named(msg_level, mtk_msg_level, int, 0);
|
||||||
@@ -3209,6 +3210,22 @@ static int mtk_probe(struct platform_dev
|
@@ -3202,6 +3203,22 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -3301,10 +3301,11 @@ static int mtk_probe(struct platform_dev
|
@@ -3294,10 +3294,11 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
||||||
(trxd.rxd2 & RX_DMA_VTAG))
|
(trxd.rxd2 & RX_DMA_VTAG))
|
||||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
||||||
@@ -3301,7 +3307,7 @@ static int mtk_probe(struct platform_dev
|
@@ -3294,7 +3300,7 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mediatek,hifsys = <&hifsys>;
|
mediatek,hifsys = <&hifsys>;
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3188,7 +3188,7 @@ static int mtk_probe(struct platform_dev
|
@@ -3181,7 +3181,7 @@ static int mtk_probe(struct platform_dev
|
||||||
struct regmap *cci;
|
struct regmap *cci;
|
||||||
|
|
||||||
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
|
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
eth->scratch_ring = NULL;
|
eth->scratch_ring = NULL;
|
||||||
eth->phy_scratch_ring = 0;
|
eth->phy_scratch_ring = 0;
|
||||||
}
|
}
|
||||||
@@ -3391,6 +3394,9 @@ static const struct mtk_soc_data mt2701_
|
@@ -3384,6 +3387,9 @@ static const struct mtk_soc_data mt2701_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
|
@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7621_data = {
|
static const struct mtk_soc_data mt7621_data = {
|
||||||
@@ -3399,6 +3405,9 @@ static const struct mtk_soc_data mt7621_
|
@@ -3392,6 +3398,9 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7622_data = {
|
static const struct mtk_soc_data mt7622_data = {
|
||||||
@@ -3408,6 +3417,9 @@ static const struct mtk_soc_data mt7622_
|
@@ -3401,6 +3410,9 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_clks = MT7622_CLKS_BITMAP,
|
.required_clks = MT7622_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7623_data = {
|
static const struct mtk_soc_data mt7623_data = {
|
||||||
@@ -3416,6 +3428,9 @@ static const struct mtk_soc_data mt7623_
|
@@ -3409,6 +3421,9 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7629_data = {
|
static const struct mtk_soc_data mt7629_data = {
|
||||||
@@ -3424,6 +3439,9 @@ static const struct mtk_soc_data mt7629_
|
@@ -3417,6 +3432,9 @@ static const struct mtk_soc_data mt7629_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7629_CLKS_BITMAP,
|
.required_clks = MT7629_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data rt5350_data = {
|
static const struct mtk_soc_data rt5350_data = {
|
||||||
@@ -3431,6 +3449,9 @@ static const struct mtk_soc_data rt5350_
|
@@ -3424,6 +3442,9 @@ static const struct mtk_soc_data rt5350_
|
||||||
.hw_features = MTK_HW_FEATURES_MT7628,
|
.hw_features = MTK_HW_FEATURES_MT7628,
|
||||||
.required_clks = MT7628_CLKS_BITMAP,
|
.required_clks = MT7628_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
|
|
@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
ring->dma = NULL;
|
ring->dma = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3406,6 +3405,7 @@ static const struct mtk_soc_data mt2701_
|
@@ -3399,6 +3398,7 @@ static const struct mtk_soc_data mt2701_
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3417,6 +3417,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -3410,6 +3410,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3429,6 +3430,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -3422,6 +3423,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3440,6 +3442,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -3433,6 +3435,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3451,6 +3454,7 @@ static const struct mtk_soc_data mt7629_
|
@@ -3444,6 +3447,7 @@ static const struct mtk_soc_data mt7629_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3461,6 +3465,7 @@ static const struct mtk_soc_data rt5350_
|
@@ -3454,6 +3458,7 @@ static const struct mtk_soc_data rt5350_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
|
|
|
@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
|
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3171,14 +3234,6 @@ static int mtk_probe(struct platform_dev
|
@@ -3164,14 +3227,6 @@ static int mtk_probe(struct platform_dev
|
||||||
if (IS_ERR(eth->base))
|
if (IS_ERR(eth->base))
|
||||||
return PTR_ERR(eth->base);
|
return PTR_ERR(eth->base);
|
||||||
|
|
||||||
|
@ -522,7 +522,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||||
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
|
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
|
||||||
eth->ip_align = NET_IP_ALIGN;
|
eth->ip_align = NET_IP_ALIGN;
|
||||||
@@ -3412,6 +3467,7 @@ static int mtk_remove(struct platform_de
|
@@ -3405,6 +3460,7 @@ static int mtk_remove(struct platform_de
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct mtk_soc_data mt2701_data = {
|
static const struct mtk_soc_data mt2701_data = {
|
||||||
|
@ -530,7 +530,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.caps = MT7623_CAPS | MTK_HWLRO,
|
.caps = MT7623_CAPS | MTK_HWLRO,
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
@@ -3423,6 +3479,7 @@ static const struct mtk_soc_data mt2701_
|
@@ -3416,6 +3472,7 @@ static const struct mtk_soc_data mt2701_
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7621_data = {
|
static const struct mtk_soc_data mt7621_data = {
|
||||||
|
@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.caps = MT7621_CAPS,
|
.caps = MT7621_CAPS,
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
@@ -3435,6 +3492,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -3428,6 +3485,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7622_data = {
|
static const struct mtk_soc_data mt7622_data = {
|
||||||
|
@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.ana_rgc3 = 0x2028,
|
.ana_rgc3 = 0x2028,
|
||||||
.caps = MT7622_CAPS | MTK_HWLRO,
|
.caps = MT7622_CAPS | MTK_HWLRO,
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
@@ -3448,6 +3506,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -3441,6 +3499,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7623_data = {
|
static const struct mtk_soc_data mt7623_data = {
|
||||||
|
@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.caps = MT7623_CAPS | MTK_HWLRO,
|
.caps = MT7623_CAPS | MTK_HWLRO,
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
@@ -3460,6 +3519,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -3453,6 +3512,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7629_data = {
|
static const struct mtk_soc_data mt7629_data = {
|
||||||
|
@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.ana_rgc3 = 0x128,
|
.ana_rgc3 = 0x128,
|
||||||
.caps = MT7629_CAPS | MTK_HWLRO,
|
.caps = MT7629_CAPS | MTK_HWLRO,
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
@@ -3472,6 +3532,7 @@ static const struct mtk_soc_data mt7629_
|
@@ -3465,6 +3525,7 @@ static const struct mtk_soc_data mt7629_
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data rt5350_data = {
|
static const struct mtk_soc_data rt5350_data = {
|
||||||
|
|
|
@ -568,7 +568,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_disable_pm:
|
err_disable_pm:
|
||||||
@@ -3234,12 +3403,8 @@ static int mtk_probe(struct platform_dev
|
@@ -3227,12 +3396,8 @@ static int mtk_probe(struct platform_dev
|
||||||
if (IS_ERR(eth->base))
|
if (IS_ERR(eth->base))
|
||||||
return PTR_ERR(eth->base);
|
return PTR_ERR(eth->base);
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
spin_lock_init(ð->page_lock);
|
spin_lock_init(ð->page_lock);
|
||||||
spin_lock_init(ð->tx_irq_lock);
|
spin_lock_init(ð->tx_irq_lock);
|
||||||
@@ -3475,6 +3640,10 @@ static const struct mtk_soc_data mt2701_
|
@@ -3468,6 +3633,10 @@ static const struct mtk_soc_data mt2701_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
@ -593,7 +593,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3488,6 +3657,10 @@ static const struct mtk_soc_data mt7621_
|
@@ -3481,6 +3650,10 @@ static const struct mtk_soc_data mt7621_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
@ -604,7 +604,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3502,6 +3675,10 @@ static const struct mtk_soc_data mt7622_
|
@@ -3495,6 +3668,10 @@ static const struct mtk_soc_data mt7622_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
@ -615,7 +615,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3515,6 +3692,10 @@ static const struct mtk_soc_data mt7623_
|
@@ -3508,6 +3685,10 @@ static const struct mtk_soc_data mt7623_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
@ -626,7 +626,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3528,6 +3709,10 @@ static const struct mtk_soc_data mt7629_
|
@@ -3521,6 +3702,10 @@ static const struct mtk_soc_data mt7629_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3540,6 +3725,10 @@ static const struct mtk_soc_data rt5350_
|
@@ -3533,6 +3718,10 @@ static const struct mtk_soc_data rt5350_
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
|
|
|
@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
};
|
};
|
||||||
|
|
||||||
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
|
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
|
||||||
@@ -3712,6 +3749,21 @@ static const struct mtk_soc_data mt7629_
|
@@ -3705,6 +3742,21 @@ static const struct mtk_soc_data mt7629_
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static const struct mtk_soc_data rt5350_data = {
|
static const struct mtk_soc_data rt5350_data = {
|
||||||
.reg_map = &mt7628_reg_map,
|
.reg_map = &mt7628_reg_map,
|
||||||
.caps = MT7628_CAPS,
|
.caps = MT7628_CAPS,
|
||||||
@@ -3734,6 +3786,7 @@ const struct of_device_id of_mtk_match[]
|
@@ -3727,6 +3779,7 @@ const struct of_device_id of_mtk_match[]
|
||||||
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
||||||
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
||||||
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
||||||
|
|
|
@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||||
else
|
else
|
||||||
skb_checksum_none_assert(skb);
|
skb_checksum_none_assert(skb);
|
||||||
@@ -3759,6 +3765,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -3752,6 +3758,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
||||||
.rx_irq_done_mask = MTK_RX_DONE_INT_V2,
|
.rx_irq_done_mask = MTK_RX_DONE_INT_V2,
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3355,6 +3355,26 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3348,6 +3348,26 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
mac->phylink_config.dev = ð->netdev[id]->dev;
|
mac->phylink_config.dev = ð->netdev[id]->dev;
|
||||||
mac->phylink_config.type = PHYLINK_NETDEV;
|
mac->phylink_config.type = PHYLINK_NETDEV;
|
||||||
|
|
|
@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.mac_pcs_get_state = mtk_mac_pcs_get_state,
|
.mac_pcs_get_state = mtk_mac_pcs_get_state,
|
||||||
.mac_an_restart = mtk_mac_an_restart,
|
.mac_an_restart = mtk_mac_an_restart,
|
||||||
.mac_config = mtk_mac_config,
|
.mac_config = mtk_mac_config,
|
||||||
@@ -3317,6 +3269,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3310,6 +3262,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
mac->phylink_config.dev = ð->netdev[id]->dev;
|
mac->phylink_config.dev = ð->netdev[id]->dev;
|
||||||
mac->phylink_config.type = PHYLINK_NETDEV;
|
mac->phylink_config.type = PHYLINK_NETDEV;
|
||||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3269,6 +3269,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3262,6 +3262,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
mac->phylink_config.dev = ð->netdev[id]->dev;
|
mac->phylink_config.dev = ð->netdev[id]->dev;
|
||||||
mac->phylink_config.type = PHYLINK_NETDEV;
|
mac->phylink_config.type = PHYLINK_NETDEV;
|
||||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3568,9 +3568,9 @@ static int mtk_probe(struct platform_dev
|
@@ -3561,9 +3561,9 @@ static int mtk_probe(struct platform_dev
|
||||||
*/
|
*/
|
||||||
init_dummy_netdev(ð->dummy_dev);
|
init_dummy_netdev(ð->dummy_dev);
|
||||||
netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx,
|
netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx,
|
||||||
|
|
|
@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3264,7 +3264,6 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3257,7 +3257,6 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
/* mac config is not set */
|
/* mac config is not set */
|
||||||
mac->interface = PHY_INTERFACE_MODE_NA;
|
mac->interface = PHY_INTERFACE_MODE_NA;
|
||||||
|
|
|
@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
|
mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
|
||||||
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
|
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
|
||||||
MAC_MCR_FORCE_RX_FC);
|
MAC_MCR_FORCE_RX_FC);
|
||||||
@@ -3268,9 +3278,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3261,9 +3271,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
mac->phylink_config.dev = ð->netdev[id]->dev;
|
mac->phylink_config.dev = ð->netdev[id]->dev;
|
||||||
mac->phylink_config.type = PHYLINK_NETDEV;
|
mac->phylink_config.type = PHYLINK_NETDEV;
|
||||||
|
|
|
@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
|
static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
|
||||||
{
|
{
|
||||||
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
|
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
|
||||||
@@ -3005,6 +3122,12 @@ static int mtk_change_mtu(struct net_dev
|
@@ -2988,6 +3105,12 @@ static int mtk_change_mtu(struct net_dev
|
||||||
struct mtk_eth *eth = mac->hw;
|
struct mtk_eth *eth = mac->hw;
|
||||||
u32 mcr_cur, mcr_new;
|
u32 mcr_cur, mcr_new;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||||
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
|
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
|
||||||
mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK;
|
mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK;
|
||||||
@@ -3332,6 +3455,7 @@ static const struct net_device_ops mtk_n
|
@@ -3314,6 +3437,7 @@ static const struct net_device_ops mtk_n
|
||||||
.ndo_poll_controller = mtk_poll_controller,
|
.ndo_poll_controller = mtk_poll_controller,
|
||||||
#endif
|
#endif
|
||||||
.ndo_setup_tc = mtk_eth_setup_tc,
|
.ndo_setup_tc = mtk_eth_setup_tc,
|
||||||
|
|
|
@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
|
|
||||||
mtk_tx_unmap(eth, tx_buf, true);
|
mtk_tx_unmap(eth, tx_buf, true);
|
||||||
@@ -3478,6 +3627,7 @@ static const struct net_device_ops mtk_n
|
@@ -3460,6 +3609,7 @@ static const struct net_device_ops mtk_n
|
||||||
#endif
|
#endif
|
||||||
.ndo_setup_tc = mtk_eth_setup_tc,
|
.ndo_setup_tc = mtk_eth_setup_tc,
|
||||||
.ndo_bpf = mtk_xdp,
|
.ndo_bpf = mtk_xdp,
|
||||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
MediaTek SoC family.
|
MediaTek SoC family.
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3488,11 +3488,18 @@ static void mtk_get_strings(struct net_d
|
@@ -3471,11 +3471,18 @@ static void mtk_get_strings(struct net_d
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
switch (stringset) {
|
switch (stringset) {
|
||||||
|
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3500,13 +3507,35 @@ static void mtk_get_strings(struct net_d
|
@@ -3483,13 +3490,35 @@ static void mtk_get_strings(struct net_d
|
||||||
static int mtk_get_sset_count(struct net_device *dev, int sset)
|
static int mtk_get_sset_count(struct net_device *dev, int sset)
|
||||||
{
|
{
|
||||||
switch (sset) {
|
switch (sset) {
|
||||||
|
@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
static void mtk_get_ethtool_stats(struct net_device *dev,
|
static void mtk_get_ethtool_stats(struct net_device *dev,
|
||||||
struct ethtool_stats *stats, u64 *data)
|
struct ethtool_stats *stats, u64 *data)
|
||||||
{
|
{
|
||||||
@@ -3534,6 +3563,8 @@ static void mtk_get_ethtool_stats(struct
|
@@ -3517,6 +3546,8 @@ static void mtk_get_ethtool_stats(struct
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
|
for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
|
||||||
*data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);
|
*data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);
|
||||||
|
|
|
@ -84,7 +84,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
refcount_set(ð->dma_refcnt, 1);
|
refcount_set(ð->dma_refcnt, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4048,7 +4053,9 @@ static int mtk_probe(struct platform_dev
|
@@ -4041,7 +4046,9 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4151,6 +4151,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4144,6 +4144,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4169,6 +4170,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4162,6 +4163,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_clks = MT7622_CLKS_BITMAP,
|
.required_clks = MT7622_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4186,6 +4188,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4179,6 +4181,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -68,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4219,6 +4222,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -4212,6 +4215,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.caps = MT7986_CAPS,
|
.caps = MT7986_CAPS,
|
||||||
.required_clks = MT7986_CLKS_BITMAP,
|
.required_clks = MT7986_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
|
|
@ -100,7 +100,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4053,12 +4058,19 @@ static int mtk_probe(struct platform_dev
|
@@ -4046,12 +4051,19 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
};
|
};
|
||||||
|
|
||||||
/* strings used by ethtool */
|
/* strings used by ethtool */
|
||||||
@@ -3970,16 +3978,12 @@ static int mtk_probe(struct platform_dev
|
@@ -3963,16 +3971,12 @@ static int mtk_probe(struct platform_dev
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
struct device_node *np = of_parse_phandle(pdev->dev.of_node,
|
struct device_node *np = of_parse_phandle(pdev->dev.of_node,
|
||||||
"mediatek,wed", i);
|
"mediatek,wed", i);
|
||||||
|
|
|
@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4168,6 +4168,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4161,6 +4161,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -29,7 +29,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4187,6 +4188,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4180,6 +4181,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -37,7 +37,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4205,6 +4207,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4198,6 +4200,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
|
|
@ -26,7 +26,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3895,6 +3895,7 @@ void mtk_eth_set_dma_device(struct mtk_e
|
@@ -3888,6 +3888,7 @@ void mtk_eth_set_dma_device(struct mtk_e
|
||||||
|
|
||||||
static int mtk_probe(struct platform_device *pdev)
|
static int mtk_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
struct device_node *mac_np;
|
struct device_node *mac_np;
|
||||||
struct mtk_eth *eth;
|
struct mtk_eth *eth;
|
||||||
int err, i;
|
int err, i;
|
||||||
@@ -3975,16 +3976,31 @@ static int mtk_probe(struct platform_dev
|
@@ -3968,16 +3969,31 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
|
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
|
||||||
mtk_ppe_check_skb(eth->ppe[0], skb, hash);
|
mtk_ppe_check_skb(eth->ppe[0], skb, hash);
|
||||||
|
|
||||||
@@ -4184,7 +4185,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4177,7 +4178,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4204,7 +4205,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4197,7 +4198,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4223,7 +4224,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4216,7 +4217,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -76,7 +76,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4255,9 +4256,11 @@ static const struct mtk_soc_data mt7986_
|
@@ -4248,9 +4249,11 @@ static const struct mtk_soc_data mt7986_
|
||||||
.reg_map = &mt7986_reg_map,
|
.reg_map = &mt7986_reg_map,
|
||||||
.ana_rgc3 = 0x128,
|
.ana_rgc3 = 0x128,
|
||||||
.caps = MT7986_CAPS,
|
.caps = MT7986_CAPS,
|
||||||
|
|
|
@ -16,7 +16,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4259,6 +4259,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -4252,6 +4252,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7986_CLKS_BITMAP,
|
.required_clks = MT7986_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
|
|
@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4011,19 +4011,23 @@ static int mtk_probe(struct platform_dev
|
@@ -4004,19 +4004,23 @@ static int mtk_probe(struct platform_dev
|
||||||
eth->irq[i] = platform_get_irq(pdev, i);
|
eth->irq[i] = platform_get_irq(pdev, i);
|
||||||
if (eth->irq[i] < 0) {
|
if (eth->irq[i] < 0) {
|
||||||
dev_err(&pdev->dev, "no IRQ%d resource found\n", i);
|
dev_err(&pdev->dev, "no IRQ%d resource found\n", i);
|
||||||
|
@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
eth->clks[i] = NULL;
|
eth->clks[i] = NULL;
|
||||||
}
|
}
|
||||||
@@ -4034,7 +4038,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4027,7 +4031,7 @@ static int mtk_probe(struct platform_dev
|
||||||
|
|
||||||
err = mtk_hw_init(eth);
|
err = mtk_hw_init(eth);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO);
|
eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO);
|
||||||
|
|
||||||
@@ -4132,6 +4136,8 @@ err_free_dev:
|
@@ -4125,6 +4129,8 @@ err_free_dev:
|
||||||
mtk_free_dev(eth);
|
mtk_free_dev(eth);
|
||||||
err_deinit_hw:
|
err_deinit_hw:
|
||||||
mtk_hw_deinit(eth);
|
mtk_hw_deinit(eth);
|
||||||
|
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -4151,6 +4157,7 @@ static int mtk_remove(struct platform_de
|
@@ -4144,6 +4150,7 @@ static int mtk_remove(struct platform_de
|
||||||
phylink_disconnect_phy(mac->phylink);
|
phylink_disconnect_phy(mac->phylink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
/* Indicates CDM to parse the MTK special tag from CPU
|
/* Indicates CDM to parse the MTK special tag from CPU
|
||||||
* which also is working out for untag packets.
|
* which also is working out for untag packets.
|
||||||
@@ -3367,7 +3399,6 @@ static int mtk_change_mtu(struct net_dev
|
@@ -3350,7 +3382,6 @@ static int mtk_change_mtu(struct net_dev
|
||||||
int length = new_mtu + MTK_RX_ETH_HLEN;
|
int length = new_mtu + MTK_RX_ETH_HLEN;
|
||||||
struct mtk_mac *mac = netdev_priv(dev);
|
struct mtk_mac *mac = netdev_priv(dev);
|
||||||
struct mtk_eth *eth = mac->hw;
|
struct mtk_eth *eth = mac->hw;
|
||||||
|
@ -71,7 +71,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
if (rcu_access_pointer(eth->prog) &&
|
if (rcu_access_pointer(eth->prog) &&
|
||||||
length > MTK_PP_MAX_BUF_SIZE) {
|
length > MTK_PP_MAX_BUF_SIZE) {
|
||||||
@@ -3375,23 +3406,7 @@ static int mtk_change_mtu(struct net_dev
|
@@ -3358,23 +3389,7 @@ static int mtk_change_mtu(struct net_dev
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3437,11 +3437,8 @@ static void mtk_pending_work(struct work
|
@@ -3420,11 +3420,8 @@ static void mtk_pending_work(struct work
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
||||||
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
|
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
@@ -3475,7 +3472,7 @@ static void mtk_pending_work(struct work
|
@@ -3458,7 +3455,7 @@ static void mtk_pending_work(struct work
|
||||||
|
|
||||||
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
|
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
|
||||||
/* Set FE to PDMAv2 if necessary */
|
/* Set FE to PDMAv2 if necessary */
|
||||||
@@ -3465,7 +3517,7 @@ static void mtk_pending_work(struct work
|
@@ -3448,7 +3500,7 @@ static void mtk_pending_work(struct work
|
||||||
if (eth->dev->pins)
|
if (eth->dev->pins)
|
||||||
pinctrl_select_state(eth->dev->pins->p,
|
pinctrl_select_state(eth->dev->pins->p,
|
||||||
eth->dev->pins->default_state);
|
eth->dev->pins->default_state);
|
||||||
|
@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
/* restart DMA and enable IRQs */
|
/* restart DMA and enable IRQs */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
@@ -4057,7 +4109,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4050,7 +4102,7 @@ static int mtk_probe(struct platform_dev
|
||||||
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
|
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
|
||||||
INIT_WORK(ð->pending_work, mtk_pending_work);
|
INIT_WORK(ð->pending_work, mtk_pending_work);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -3489,30 +3508,53 @@ static int mtk_do_ioctl(struct net_devic
|
@@ -3472,30 +3491,53 @@ static int mtk_do_ioctl(struct net_devic
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
if (eth->dev->pins)
|
if (eth->dev->pins)
|
||||||
pinctrl_select_state(eth->dev->pins->p,
|
pinctrl_select_state(eth->dev->pins->p,
|
||||||
@@ -3523,15 +3565,19 @@ static void mtk_pending_work(struct work
|
@@ -3506,15 +3548,19 @@ static void mtk_pending_work(struct work
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
if (!test_bit(i, &restart))
|
if (!test_bit(i, &restart))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
static int mtk_hw_init(struct mtk_eth *eth, bool reset)
|
static int mtk_hw_init(struct mtk_eth *eth, bool reset)
|
||||||
{
|
{
|
||||||
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
|
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
|
||||||
@@ -3615,6 +3717,7 @@ static int mtk_cleanup(struct mtk_eth *e
|
@@ -3598,6 +3700,7 @@ static int mtk_cleanup(struct mtk_eth *e
|
||||||
mtk_unreg_dev(eth);
|
mtk_unreg_dev(eth);
|
||||||
mtk_free_dev(eth);
|
mtk_free_dev(eth);
|
||||||
cancel_work_sync(ð->pending_work);
|
cancel_work_sync(ð->pending_work);
|
||||||
|
@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4042,6 +4145,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4035,6 +4138,7 @@ static int mtk_probe(struct platform_dev
|
||||||
|
|
||||||
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
||||||
INIT_WORK(ð->rx_dim.work, mtk_dim_rx);
|
INIT_WORK(ð->rx_dim.work, mtk_dim_rx);
|
||||||
|
@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
||||||
INIT_WORK(ð->tx_dim.work, mtk_dim_tx);
|
INIT_WORK(ð->tx_dim.work, mtk_dim_tx);
|
||||||
@@ -4246,6 +4350,8 @@ static int mtk_probe(struct platform_dev
|
@@ -4239,6 +4343,8 @@ static int mtk_probe(struct platform_dev
|
||||||
NAPI_POLL_WEIGHT);
|
NAPI_POLL_WEIGHT);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, eth);
|
platform_set_drvdata(pdev, eth);
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3646,6 +3646,11 @@ static void mtk_pending_work(struct work
|
@@ -3629,6 +3629,11 @@ static void mtk_pending_work(struct work
|
||||||
set_bit(MTK_RESETTING, ð->state);
|
set_bit(MTK_RESETTING, ð->state);
|
||||||
|
|
||||||
mtk_prepare_for_reset(eth);
|
mtk_prepare_for_reset(eth);
|
||||||
|
@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
@@ -3683,6 +3688,8 @@ static void mtk_pending_work(struct work
|
@@ -3666,6 +3671,8 @@ static void mtk_pending_work(struct work
|
||||||
|
|
||||||
clear_bit(MTK_RESETTING, ð->state);
|
clear_bit(MTK_RESETTING, ð->state);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4428,7 +4428,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4421,7 +4421,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
@@ -4467,7 +4467,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4460,7 +4460,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
|
|
|
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3717,8 +3873,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
@@ -3700,8 +3856,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
|
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
unregister_netdev(eth->netdev[i]);
|
unregister_netdev(eth->netdev[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3935,6 +4095,23 @@ static int mtk_set_rxnfc(struct net_devi
|
@@ -3918,6 +4078,23 @@ static int mtk_set_rxnfc(struct net_devi
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
static const struct ethtool_ops mtk_ethtool_ops = {
|
static const struct ethtool_ops mtk_ethtool_ops = {
|
||||||
.get_link_ksettings = mtk_get_link_ksettings,
|
.get_link_ksettings = mtk_get_link_ksettings,
|
||||||
.set_link_ksettings = mtk_set_link_ksettings,
|
.set_link_ksettings = mtk_set_link_ksettings,
|
||||||
@@ -3970,6 +4147,7 @@ static const struct net_device_ops mtk_n
|
@@ -3952,6 +4129,7 @@ static const struct net_device_ops mtk_n
|
||||||
.ndo_setup_tc = mtk_eth_setup_tc,
|
.ndo_setup_tc = mtk_eth_setup_tc,
|
||||||
.ndo_bpf = mtk_xdp,
|
.ndo_bpf = mtk_xdp,
|
||||||
.ndo_xdp_xmit = mtk_xdp_xmit,
|
.ndo_xdp_xmit = mtk_xdp_xmit,
|
||||||
|
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||||
@@ -3979,6 +4157,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3961,6 +4139,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
struct phylink *phylink;
|
struct phylink *phylink;
|
||||||
struct mtk_mac *mac;
|
struct mtk_mac *mac;
|
||||||
int id, err;
|
int id, err;
|
||||||
|
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
if (!_id) {
|
if (!_id) {
|
||||||
dev_err(eth->dev, "missing mac id\n");
|
dev_err(eth->dev, "missing mac id\n");
|
||||||
@@ -3996,7 +4175,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3978,7 +4157,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (!eth->netdev[id]) {
|
if (!eth->netdev[id]) {
|
||||||
dev_err(eth->dev, "alloc_etherdev failed\n");
|
dev_err(eth->dev, "alloc_etherdev failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -4093,6 +4275,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4086,6 +4268,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
else
|
else
|
||||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
/* Enable RX VLan Offloading */
|
/* Enable RX VLan Offloading */
|
||||||
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
|
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
|
||||||
@@ -3865,6 +3925,12 @@ static int mtk_free_dev(struct mtk_eth *
|
@@ -3848,6 +3908,12 @@ static int mtk_free_dev(struct mtk_eth *
|
||||||
free_netdev(eth->netdev[i]);
|
free_netdev(eth->netdev[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_eth_path_name(path), __func__, updated);
|
mtk_eth_path_name(path), __func__, updated);
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4755,6 +4755,26 @@ static const struct mtk_soc_data mt7629_
|
@@ -4748,6 +4748,26 @@ static const struct mtk_soc_data mt7629_
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
static const struct mtk_soc_data mt7986_data = {
|
static const struct mtk_soc_data mt7986_data = {
|
||||||
.reg_map = &mt7986_reg_map,
|
.reg_map = &mt7986_reg_map,
|
||||||
.ana_rgc3 = 0x128,
|
.ana_rgc3 = 0x128,
|
||||||
@@ -4797,6 +4817,7 @@ const struct of_device_id of_mtk_match[]
|
@@ -4790,6 +4810,7 @@ const struct of_device_id of_mtk_match[]
|
||||||
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
||||||
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
||||||
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
||||||
|
|
|
@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3977,8 +3978,17 @@ static int mtk_unreg_dev(struct mtk_eth
|
@@ -3960,8 +3961,17 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_unreg_dev(eth);
|
mtk_unreg_dev(eth);
|
||||||
mtk_free_dev(eth);
|
mtk_free_dev(eth);
|
||||||
cancel_work_sync(ð->pending_work);
|
cancel_work_sync(ð->pending_work);
|
||||||
@@ -4408,6 +4418,36 @@ void mtk_eth_set_dma_device(struct mtk_e
|
@@ -4401,6 +4411,36 @@ void mtk_eth_set_dma_device(struct mtk_e
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
static int mtk_probe(struct platform_device *pdev)
|
static int mtk_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct resource *res = NULL;
|
struct resource *res = NULL;
|
||||||
@@ -4471,13 +4511,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4464,13 +4504,7 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
|
||||||
|
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
@@ -4488,14 +4522,17 @@ static int mtk_probe(struct platform_dev
|
@@ -4481,14 +4515,17 @@ static int mtk_probe(struct platform_dev
|
||||||
"mediatek,pctl");
|
"mediatek,pctl");
|
||||||
if (IS_ERR(eth->pctl)) {
|
if (IS_ERR(eth->pctl)) {
|
||||||
dev_err(&pdev->dev, "no pctl regmap found\n");
|
dev_err(&pdev->dev, "no pctl regmap found\n");
|
||||||
|
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
@@ -4655,6 +4692,8 @@ err_deinit_hw:
|
@@ -4648,6 +4685,8 @@ err_deinit_hw:
|
||||||
mtk_hw_deinit(eth);
|
mtk_hw_deinit(eth);
|
||||||
err_wed_exit:
|
err_wed_exit:
|
||||||
mtk_wed_exit();
|
mtk_wed_exit();
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
From e7731194fdf085f46d58b1adccfddbd0dfee4873 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
||||||
Date: Fri, 7 Jul 2023 08:53:25 +0200
|
|
||||||
Subject: [PATCH] net: bgmac: postpone turning IRQs off to avoid SoC hangs
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Turning IRQs off is done by accessing Ethernet controller registers.
|
|
||||||
That can't be done until device's clock is enabled. It results in a SoC
|
|
||||||
hang otherwise.
|
|
||||||
|
|
||||||
This bug remained unnoticed for years as most bootloaders keep all
|
|
||||||
Ethernet interfaces turned on. It seems to only affect a niche SoC
|
|
||||||
family BCM47189. It has two Ethernet controllers but CFE bootloader uses
|
|
||||||
only the first one.
|
|
||||||
|
|
||||||
Fixes: 34322615cbaa ("net: bgmac: Mask interrupts during probe")
|
|
||||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
||||||
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
|
|
||||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
||||||
---
|
|
||||||
drivers/net/ethernet/broadcom/bgmac.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/broadcom/bgmac.c
|
|
||||||
+++ b/drivers/net/ethernet/broadcom/bgmac.c
|
|
||||||
@@ -1492,8 +1492,6 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
|
||||||
|
|
||||||
bgmac->in_init = true;
|
|
||||||
|
|
||||||
- bgmac_chip_intrs_off(bgmac);
|
|
||||||
-
|
|
||||||
net_dev->irq = bgmac->irq;
|
|
||||||
SET_NETDEV_DEV(net_dev, bgmac->dev);
|
|
||||||
dev_set_drvdata(bgmac->dev, bgmac);
|
|
||||||
@@ -1511,6 +1509,8 @@ int bgmac_enet_probe(struct bgmac *bgmac
|
|
||||||
*/
|
|
||||||
bgmac_clk_enable(bgmac, 0);
|
|
||||||
|
|
||||||
+ bgmac_chip_intrs_off(bgmac);
|
|
||||||
+
|
|
||||||
/* This seems to be fixing IRQ by assigning OOB #6 to the core */
|
|
||||||
if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) {
|
|
||||||
if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6)
|
|
|
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
stmmac_clear_tx_descriptors(priv, queue);
|
stmmac_clear_tx_descriptors(priv, queue);
|
||||||
|
|
||||||
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
|
||||||
@@ -7417,6 +7412,25 @@ int stmmac_suspend(struct device *dev)
|
@@ -7411,6 +7406,25 @@ int stmmac_suspend(struct device *dev)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
/**
|
/**
|
||||||
* stmmac_reset_queues_param - reset queue parameters
|
* stmmac_reset_queues_param - reset queue parameters
|
||||||
* @priv: device pointer
|
* @priv: device pointer
|
||||||
@@ -7427,22 +7441,11 @@ static void stmmac_reset_queues_param(st
|
@@ -7421,22 +7435,11 @@ static void stmmac_reset_queues_param(st
|
||||||
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
u32 tx_cnt = priv->plat->tx_queues_to_use;
|
||||||
u32 queue;
|
u32 queue;
|
||||||
|
|
||||||
|
|
|
@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
if (netif_running(dev))
|
if (netif_running(dev))
|
||||||
ret = stmmac_open(dev);
|
ret = stmmac_open(dev);
|
||||||
@@ -7363,7 +7367,7 @@ int stmmac_suspend(struct device *dev)
|
@@ -7357,7 +7361,7 @@ int stmmac_suspend(struct device *dev)
|
||||||
stmmac_disable_all_queues(priv);
|
stmmac_disable_all_queues(priv);
|
||||||
|
|
||||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||||
|
@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
if (priv->eee_enabled) {
|
if (priv->eee_enabled) {
|
||||||
priv->tx_path_in_lpi_mode = false;
|
priv->tx_path_in_lpi_mode = false;
|
||||||
@@ -7414,7 +7418,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
@@ -7408,7 +7412,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
|
||||||
|
|
||||||
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
|
@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
rx_q->cur_rx = 0;
|
rx_q->cur_rx = 0;
|
||||||
rx_q->dirty_rx = 0;
|
rx_q->dirty_rx = 0;
|
||||||
@@ -7422,7 +7426,7 @@ static void stmmac_reset_rx_queue(struct
|
@@ -7416,7 +7420,7 @@ static void stmmac_reset_rx_queue(struct
|
||||||
|
|
||||||
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
dma_desc_error:
|
dma_desc_error:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -7509,7 +7625,7 @@ int stmmac_resume(struct device *dev)
|
@@ -7503,7 +7619,7 @@ int stmmac_resume(struct device *dev)
|
||||||
stmmac_reset_queues_param(priv);
|
stmmac_reset_queues_param(priv);
|
||||||
|
|
||||||
stmmac_free_tx_skbufs(priv);
|
stmmac_free_tx_skbufs(priv);
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
From cee4bd16c3195a701be683f7da9e88c6e11acb73 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
||||||
Date: Wed, 19 Apr 2023 23:07:39 +0200
|
|
||||||
Subject: [PATCH 1/5] leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on
|
|
||||||
dev rename
|
|
||||||
|
|
||||||
Dev can be renamed also while up for supported device. We currently
|
|
||||||
wrongly clear the NETDEV_LED_MODE_LINKUP flag on NETDEV_CHANGENAME
|
|
||||||
event.
|
|
||||||
|
|
||||||
Fix this by rechecking if the carrier is ok on NETDEV_CHANGENAME and
|
|
||||||
correctly set the NETDEV_LED_MODE_LINKUP bit.
|
|
||||||
|
|
||||||
Fixes: 5f820ed52371 ("leds: trigger: netdev: fix handling on interface rename")
|
|
||||||
Cc: stable@vger.kernel.org # v5.5+
|
|
||||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
||||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
||||||
Signed-off-by: Lee Jones <lee@kernel.org>
|
|
||||||
Link: https://lore.kernel.org/r/20230419210743.3594-2-ansuelsmth@gmail.com
|
|
||||||
---
|
|
||||||
drivers/leds/trigger/ledtrig-netdev.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
--- a/drivers/leds/trigger/ledtrig-netdev.c
|
|
||||||
+++ b/drivers/leds/trigger/ledtrig-netdev.c
|
|
||||||
@@ -318,6 +318,9 @@ static int netdev_trig_notify(struct not
|
|
||||||
clear_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode);
|
|
||||||
switch (evt) {
|
|
||||||
case NETDEV_CHANGENAME:
|
|
||||||
+ if (netif_carrier_ok(dev))
|
|
||||||
+ set_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode);
|
|
||||||
+ fallthrough;
|
|
||||||
case NETDEV_REGISTER:
|
|
||||||
if (trigger_data->net_dev)
|
|
||||||
dev_put(trigger_data->net_dev);
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3495,11 +3495,8 @@ static void mtk_pending_work(struct work
|
@@ -3478,11 +3478,8 @@ static void mtk_pending_work(struct work
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
||||||
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
|
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
@@ -3533,7 +3530,7 @@ static void mtk_pending_work(struct work
|
@@ -3516,7 +3513,7 @@ static void mtk_pending_work(struct work
|
||||||
|
|
||||||
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
|
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
|
||||||
/* Set FE to PDMAv2 if necessary */
|
/* Set FE to PDMAv2 if necessary */
|
||||||
@@ -3522,7 +3574,7 @@ static void mtk_pending_work(struct work
|
@@ -3505,7 +3557,7 @@ static void mtk_pending_work(struct work
|
||||||
if (eth->dev->pins)
|
if (eth->dev->pins)
|
||||||
pinctrl_select_state(eth->dev->pins->p,
|
pinctrl_select_state(eth->dev->pins->p,
|
||||||
eth->dev->pins->default_state);
|
eth->dev->pins->default_state);
|
||||||
|
@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
/* restart DMA and enable IRQs */
|
/* restart DMA and enable IRQs */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
@@ -4114,7 +4166,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4107,7 +4159,7 @@ static int mtk_probe(struct platform_dev
|
||||||
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
|
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
|
||||||
INIT_WORK(ð->pending_work, mtk_pending_work);
|
INIT_WORK(ð->pending_work, mtk_pending_work);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -3546,30 +3565,53 @@ static int mtk_do_ioctl(struct net_devic
|
@@ -3529,30 +3548,53 @@ static int mtk_do_ioctl(struct net_devic
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
if (eth->dev->pins)
|
if (eth->dev->pins)
|
||||||
pinctrl_select_state(eth->dev->pins->p,
|
pinctrl_select_state(eth->dev->pins->p,
|
||||||
@@ -3580,15 +3622,19 @@ static void mtk_pending_work(struct work
|
@@ -3563,15 +3605,19 @@ static void mtk_pending_work(struct work
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
if (!test_bit(i, &restart))
|
if (!test_bit(i, &restart))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
static int mtk_hw_init(struct mtk_eth *eth, bool reset)
|
static int mtk_hw_init(struct mtk_eth *eth, bool reset)
|
||||||
{
|
{
|
||||||
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
|
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
|
||||||
@@ -3672,6 +3774,7 @@ static int mtk_cleanup(struct mtk_eth *e
|
@@ -3655,6 +3757,7 @@ static int mtk_cleanup(struct mtk_eth *e
|
||||||
mtk_unreg_dev(eth);
|
mtk_unreg_dev(eth);
|
||||||
mtk_free_dev(eth);
|
mtk_free_dev(eth);
|
||||||
cancel_work_sync(ð->pending_work);
|
cancel_work_sync(ð->pending_work);
|
||||||
|
@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4099,6 +4202,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4092,6 +4195,7 @@ static int mtk_probe(struct platform_dev
|
||||||
|
|
||||||
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
||||||
INIT_WORK(ð->rx_dim.work, mtk_dim_rx);
|
INIT_WORK(ð->rx_dim.work, mtk_dim_rx);
|
||||||
|
@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
|
||||||
INIT_WORK(ð->tx_dim.work, mtk_dim_tx);
|
INIT_WORK(ð->tx_dim.work, mtk_dim_tx);
|
||||||
@@ -4301,6 +4405,8 @@ static int mtk_probe(struct platform_dev
|
@@ -4294,6 +4398,8 @@ static int mtk_probe(struct platform_dev
|
||||||
netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx);
|
netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx);
|
||||||
|
|
||||||
platform_set_drvdata(pdev, eth);
|
platform_set_drvdata(pdev, eth);
|
||||||
|
|
|
@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3703,6 +3703,11 @@ static void mtk_pending_work(struct work
|
@@ -3686,6 +3686,11 @@ static void mtk_pending_work(struct work
|
||||||
set_bit(MTK_RESETTING, ð->state);
|
set_bit(MTK_RESETTING, ð->state);
|
||||||
|
|
||||||
mtk_prepare_for_reset(eth);
|
mtk_prepare_for_reset(eth);
|
||||||
|
@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
@@ -3740,6 +3745,8 @@ static void mtk_pending_work(struct work
|
@@ -3723,6 +3728,8 @@ static void mtk_pending_work(struct work
|
||||||
|
|
||||||
clear_bit(MTK_RESETTING, ð->state);
|
clear_bit(MTK_RESETTING, ð->state);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4484,7 +4484,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4477,7 +4477,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
@@ -4523,7 +4523,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4516,7 +4516,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
|
|
|
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3774,8 +3930,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
@@ -3757,8 +3913,12 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
for (i = 0; i < MTK_MAC_COUNT; i++) {
|
||||||
|
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
unregister_netdev(eth->netdev[i]);
|
unregister_netdev(eth->netdev[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3992,6 +4152,23 @@ static int mtk_set_rxnfc(struct net_devi
|
@@ -3975,6 +4135,23 @@ static int mtk_set_rxnfc(struct net_devi
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
static const struct ethtool_ops mtk_ethtool_ops = {
|
static const struct ethtool_ops mtk_ethtool_ops = {
|
||||||
.get_link_ksettings = mtk_get_link_ksettings,
|
.get_link_ksettings = mtk_get_link_ksettings,
|
||||||
.set_link_ksettings = mtk_set_link_ksettings,
|
.set_link_ksettings = mtk_set_link_ksettings,
|
||||||
@@ -4027,6 +4204,7 @@ static const struct net_device_ops mtk_n
|
@@ -4009,6 +4186,7 @@ static const struct net_device_ops mtk_n
|
||||||
.ndo_setup_tc = mtk_eth_setup_tc,
|
.ndo_setup_tc = mtk_eth_setup_tc,
|
||||||
.ndo_bpf = mtk_xdp,
|
.ndo_bpf = mtk_xdp,
|
||||||
.ndo_xdp_xmit = mtk_xdp_xmit,
|
.ndo_xdp_xmit = mtk_xdp_xmit,
|
||||||
|
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||||
@@ -4036,6 +4214,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4018,6 +4196,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
struct phylink *phylink;
|
struct phylink *phylink;
|
||||||
struct mtk_mac *mac;
|
struct mtk_mac *mac;
|
||||||
int id, err;
|
int id, err;
|
||||||
|
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
if (!_id) {
|
if (!_id) {
|
||||||
dev_err(eth->dev, "missing mac id\n");
|
dev_err(eth->dev, "missing mac id\n");
|
||||||
@@ -4053,7 +4232,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4035,7 +4214,10 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
if (!eth->netdev[id]) {
|
if (!eth->netdev[id]) {
|
||||||
dev_err(eth->dev, "alloc_etherdev failed\n");
|
dev_err(eth->dev, "alloc_etherdev failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -4150,6 +4332,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4143,6 +4325,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
else
|
else
|
||||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
/* Enable RX VLan Offloading */
|
/* Enable RX VLan Offloading */
|
||||||
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
|
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
|
||||||
@@ -3922,6 +3982,12 @@ static int mtk_free_dev(struct mtk_eth *
|
@@ -3905,6 +3965,12 @@ static int mtk_free_dev(struct mtk_eth *
|
||||||
free_netdev(eth->netdev[i]);
|
free_netdev(eth->netdev[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_eth_path_name(path), __func__, updated);
|
mtk_eth_path_name(path), __func__, updated);
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4808,6 +4808,26 @@ static const struct mtk_soc_data mt7629_
|
@@ -4801,6 +4801,26 @@ static const struct mtk_soc_data mt7629_
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
static const struct mtk_soc_data mt7986_data = {
|
static const struct mtk_soc_data mt7986_data = {
|
||||||
.reg_map = &mt7986_reg_map,
|
.reg_map = &mt7986_reg_map,
|
||||||
.ana_rgc3 = 0x128,
|
.ana_rgc3 = 0x128,
|
||||||
@@ -4849,6 +4869,7 @@ const struct of_device_id of_mtk_match[]
|
@@ -4842,6 +4862,7 @@ const struct of_device_id of_mtk_match[]
|
||||||
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
|
||||||
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
|
||||||
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
|
||||||
|
|
|
@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -4031,8 +4032,17 @@ static int mtk_unreg_dev(struct mtk_eth
|
@@ -4014,8 +4015,17 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_unreg_dev(eth);
|
mtk_unreg_dev(eth);
|
||||||
mtk_free_dev(eth);
|
mtk_free_dev(eth);
|
||||||
cancel_work_sync(ð->pending_work);
|
cancel_work_sync(ð->pending_work);
|
||||||
@@ -4462,6 +4472,36 @@ void mtk_eth_set_dma_device(struct mtk_e
|
@@ -4455,6 +4465,36 @@ void mtk_eth_set_dma_device(struct mtk_e
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
static int mtk_probe(struct platform_device *pdev)
|
static int mtk_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct resource *res = NULL;
|
struct resource *res = NULL;
|
||||||
@@ -4525,13 +4565,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4518,13 +4558,7 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
|
||||||
|
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
@@ -4542,14 +4576,17 @@ static int mtk_probe(struct platform_dev
|
@@ -4535,14 +4569,17 @@ static int mtk_probe(struct platform_dev
|
||||||
"mediatek,pctl");
|
"mediatek,pctl");
|
||||||
if (IS_ERR(eth->pctl)) {
|
if (IS_ERR(eth->pctl)) {
|
||||||
dev_err(&pdev->dev, "no pctl regmap found\n");
|
dev_err(&pdev->dev, "no pctl regmap found\n");
|
||||||
|
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
@@ -4708,6 +4745,8 @@ err_deinit_hw:
|
@@ -4701,6 +4738,8 @@ err_deinit_hw:
|
||||||
mtk_hw_deinit(eth);
|
mtk_hw_deinit(eth);
|
||||||
err_wed_exit:
|
err_wed_exit:
|
||||||
mtk_wed_exit();
|
mtk_wed_exit();
|
||||||
|
|
|
@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/scripts/mod/modpost.c
|
--- a/scripts/mod/modpost.c
|
||||||
+++ b/scripts/mod/modpost.c
|
+++ b/scripts/mod/modpost.c
|
||||||
@@ -2036,7 +2036,9 @@ static void read_symbols(const char *mod
|
@@ -2000,7 +2000,9 @@ static void read_symbols(const char *mod
|
||||||
symname = remove_dot(info.strtab + sym->st_name);
|
symname = remove_dot(info.strtab + sym->st_name);
|
||||||
|
|
||||||
handle_symbol(mod, &info, sym, symname);
|
handle_symbol(mod, &info, sym, symname);
|
||||||
|
@ -153,7 +153,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
|
||||||
@@ -2215,8 +2217,10 @@ static void add_header(struct buffer *b,
|
@@ -2179,8 +2181,10 @@ static void add_header(struct buffer *b,
|
||||||
buf_printf(b, "BUILD_SALT;\n");
|
buf_printf(b, "BUILD_SALT;\n");
|
||||||
buf_printf(b, "BUILD_LTO_INFO;\n");
|
buf_printf(b, "BUILD_LTO_INFO;\n");
|
||||||
buf_printf(b, "\n");
|
buf_printf(b, "\n");
|
||||||
|
@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
buf_printf(b, "\n");
|
buf_printf(b, "\n");
|
||||||
buf_printf(b, "__visible struct module __this_module\n");
|
buf_printf(b, "__visible struct module __this_module\n");
|
||||||
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
|
buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
|
||||||
@@ -2233,8 +2237,10 @@ static void add_header(struct buffer *b,
|
@@ -2197,8 +2201,10 @@ static void add_header(struct buffer *b,
|
||||||
|
|
||||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cannot check for assembler */
|
/* Cannot check for assembler */
|
||||||
@@ -2247,8 +2253,10 @@ static void add_retpoline(struct buffer
|
@@ -2211,8 +2217,10 @@ static void add_retpoline(struct buffer
|
||||||
|
|
||||||
static void add_staging_flag(struct buffer *b, const char *name)
|
static void add_staging_flag(struct buffer *b, const char *name)
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2328,11 +2336,13 @@ static void add_depends(struct buffer *b
|
@@ -2292,11 +2300,13 @@ static void add_depends(struct buffer *b
|
||||||
|
|
||||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write_buf(struct buffer *b, const char *fname)
|
static void write_buf(struct buffer *b, const char *fname)
|
||||||
@@ -2581,7 +2591,9 @@ int main(int argc, char **argv)
|
@@ -2545,7 +2555,9 @@ int main(int argc, char **argv)
|
||||||
add_staging_flag(&buf, mod->name);
|
add_staging_flag(&buf, mod->name);
|
||||||
add_versions(&buf, mod);
|
add_versions(&buf, mod);
|
||||||
add_depends(&buf, mod);
|
add_depends(&buf, mod);
|
||||||
|
|
|
@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/property.h>
|
#include <linux/property.h>
|
||||||
@@ -3360,3 +3361,5 @@ static int __init regmap_initcall(void)
|
@@ -3358,3 +3359,5 @@ static int __init regmap_initcall(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
postcore_initcall(regmap_initcall);
|
postcore_initcall(regmap_initcall);
|
||||||
|
|
|
@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
|
||||||
|
|
||||||
#define QUECTEL_VENDOR_ID 0x2c7c
|
#define QUECTEL_VENDOR_ID 0x2c7c
|
||||||
/* These Quectel products use Quectel's vendor ID */
|
/* These Quectel products use Quectel's vendor ID */
|
||||||
@@ -1173,6 +1175,11 @@ static const struct usb_device_id option
|
@@ -1177,6 +1179,11 @@ static const struct usb_device_id option
|
||||||
.driver_info = ZLP },
|
.driver_info = ZLP },
|
||||||
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
|
||||||
.driver_info = RSVD(4) },
|
.driver_info = RSVD(4) },
|
||||||
|
|
|
@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/net/core/sock.c
|
--- a/net/core/sock.c
|
||||||
+++ b/net/core/sock.c
|
+++ b/net/core/sock.c
|
||||||
@@ -3866,6 +3866,8 @@ static __net_initdata struct pernet_oper
|
@@ -3877,6 +3877,8 @@ static __net_initdata struct pernet_oper
|
||||||
|
|
||||||
static int __init proto_init(void)
|
static int __init proto_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/property.h>
|
#include <linux/property.h>
|
||||||
@@ -3513,3 +3514,5 @@ static int __init regmap_initcall(void)
|
@@ -3511,3 +3512,5 @@ static int __init regmap_initcall(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
postcore_initcall(regmap_initcall);
|
postcore_initcall(regmap_initcall);
|
||||||
|
|
|
@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
|
||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -3465,6 +3465,9 @@ static int mv88e6xxx_setup_port(struct m
|
@@ -3472,6 +3472,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||||
else
|
else
|
||||||
reg = 1 << port;
|
reg = 1 << port;
|
||||||
|
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
From eee53f6eb7561f516b9c4bac829ce31c48096130 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Fabian Frederick <fabf@skynet.be>
|
|
||||||
Date: Tue, 9 May 2017 22:30:03 +0200
|
|
||||||
Subject: [PATCH] jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
|
|
||||||
|
|
||||||
Use kcalloc() for allocation/flush of 128 pointers table to
|
|
||||||
reduce stack usage.
|
|
||||||
|
|
||||||
Function now returns -ENOMEM or 0 on success.
|
|
||||||
|
|
||||||
stackusage
|
|
||||||
Before:
|
|
||||||
./fs/jffs2/xattr.c:775 jffs2_build_xattr_subsystem 1208
|
|
||||||
dynamic,bounded
|
|
||||||
|
|
||||||
After:
|
|
||||||
./fs/jffs2/xattr.c:775 jffs2_build_xattr_subsystem 192
|
|
||||||
dynamic,bounded
|
|
||||||
|
|
||||||
Also update definition when CONFIG_JFFS2_FS_XATTR is not enabled
|
|
||||||
|
|
||||||
Tested with an MTD mount point and some user set/getfattr.
|
|
||||||
|
|
||||||
Many current target on OpenWRT also suffer from a compilation warning
|
|
||||||
(that become an error with CONFIG_WERROR) with the following output:
|
|
||||||
|
|
||||||
fs/jffs2/xattr.c: In function 'jffs2_build_xattr_subsystem':
|
|
||||||
fs/jffs2/xattr.c:887:1: error: the frame size of 1088 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|
|
||||||
887 | }
|
|
||||||
| ^
|
|
||||||
|
|
||||||
Using dynamic allocation fix this compilation warning.
|
|
||||||
|
|
||||||
Fixes: c9f700f840bd ("[JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion")
|
|
||||||
Reported-by: Tim Gardner <tim.gardner@canonical.com>
|
|
||||||
Reported-by: kernel test robot <lkp@intel.com>
|
|
||||||
Reported-by: Ron Economos <re@w6rz.net>
|
|
||||||
Reported-by: Nathan Chancellor <nathan@kernel.org>
|
|
||||||
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
|
|
||||||
Signed-off-by: Fabian Frederick <fabf@skynet.be>
|
|
||||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
---
|
|
||||||
fs/jffs2/build.c | 5 ++++-
|
|
||||||
fs/jffs2/xattr.c | 13 +++++++++----
|
|
||||||
fs/jffs2/xattr.h | 4 ++--
|
|
||||||
3 files changed, 15 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
--- a/fs/jffs2/build.c
|
|
||||||
+++ b/fs/jffs2/build.c
|
|
||||||
@@ -211,7 +211,10 @@ static int jffs2_build_filesystem(struct
|
|
||||||
ic->scan_dents = NULL;
|
|
||||||
cond_resched();
|
|
||||||
}
|
|
||||||
- jffs2_build_xattr_subsystem(c);
|
|
||||||
+ ret = jffs2_build_xattr_subsystem(c);
|
|
||||||
+ if (ret)
|
|
||||||
+ goto exit;
|
|
||||||
+
|
|
||||||
c->flags &= ~JFFS2_SB_FLAG_BUILDING;
|
|
||||||
|
|
||||||
dbg_fsbuild("FS build complete\n");
|
|
||||||
--- a/fs/jffs2/xattr.c
|
|
||||||
+++ b/fs/jffs2/xattr.c
|
|
||||||
@@ -772,10 +772,10 @@ void jffs2_clear_xattr_subsystem(struct
|
|
||||||
}
|
|
||||||
|
|
||||||
#define XREF_TMPHASH_SIZE (128)
|
|
||||||
-void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
|
|
||||||
+int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
|
|
||||||
{
|
|
||||||
struct jffs2_xattr_ref *ref, *_ref;
|
|
||||||
- struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE];
|
|
||||||
+ struct jffs2_xattr_ref **xref_tmphash;
|
|
||||||
struct jffs2_xattr_datum *xd, *_xd;
|
|
||||||
struct jffs2_inode_cache *ic;
|
|
||||||
struct jffs2_raw_node_ref *raw;
|
|
||||||
@@ -784,9 +784,12 @@ void jffs2_build_xattr_subsystem(struct
|
|
||||||
|
|
||||||
BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
|
|
||||||
|
|
||||||
+ xref_tmphash = kcalloc(XREF_TMPHASH_SIZE,
|
|
||||||
+ sizeof(struct jffs2_xattr_ref *), GFP_KERNEL);
|
|
||||||
+ if (!xref_tmphash)
|
|
||||||
+ return -ENOMEM;
|
|
||||||
+
|
|
||||||
/* Phase.1 : Merge same xref */
|
|
||||||
- for (i=0; i < XREF_TMPHASH_SIZE; i++)
|
|
||||||
- xref_tmphash[i] = NULL;
|
|
||||||
for (ref=c->xref_temp; ref; ref=_ref) {
|
|
||||||
struct jffs2_xattr_ref *tmp;
|
|
||||||
|
|
||||||
@@ -884,6 +887,8 @@ void jffs2_build_xattr_subsystem(struct
|
|
||||||
"%u of xref (%u dead, %u orphan) found.\n",
|
|
||||||
xdatum_count, xdatum_unchecked_count, xdatum_orphan_count,
|
|
||||||
xref_count, xref_dead_count, xref_orphan_count);
|
|
||||||
+ kfree(xref_tmphash);
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,
|
|
||||||
--- a/fs/jffs2/xattr.h
|
|
||||||
+++ b/fs/jffs2/xattr.h
|
|
||||||
@@ -71,7 +71,7 @@ static inline int is_xattr_ref_dead(stru
|
|
||||||
#ifdef CONFIG_JFFS2_FS_XATTR
|
|
||||||
|
|
||||||
extern void jffs2_init_xattr_subsystem(struct jffs2_sb_info *c);
|
|
||||||
-extern void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c);
|
|
||||||
+extern int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c);
|
|
||||||
extern void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c);
|
|
||||||
|
|
||||||
extern struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,
|
|
||||||
@@ -103,7 +103,7 @@ extern ssize_t jffs2_listxattr(struct de
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define jffs2_init_xattr_subsystem(c)
|
|
||||||
-#define jffs2_build_xattr_subsystem(c)
|
|
||||||
+#define jffs2_build_xattr_subsystem(c) (0)
|
|
||||||
#define jffs2_clear_xattr_subsystem(c)
|
|
||||||
|
|
||||||
#define jffs2_xattr_do_crccheck_inode(c, ic)
|
|
|
@ -1,44 +0,0 @@
|
||||||
From 525ff9c2965770762b81d679820552a208070d59 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Arnd Bergmann <arnd@arndb.de>
|
|
||||||
Date: Tue, 17 Jan 2023 17:40:35 +0100
|
|
||||||
Subject: workqueue: fix enum type for gcc-13
|
|
||||||
|
|
||||||
In gcc-13, the WORK_STRUCT_WQ_DATA_MASK constant is a signed 64-bit
|
|
||||||
type on 32-bit architectures because the enum definition has both
|
|
||||||
negative numbers and numbers above LONG_MAX in it:
|
|
||||||
|
|
||||||
kernel/workqueue.c: In function 'get_work_pwq':
|
|
||||||
kernel/workqueue.c:709:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
|
|
||||||
709 | return (void *)(data & WORK_STRUCT_WQ_DATA_MASK);
|
|
||||||
| ^
|
|
||||||
kernel/workqueue.c: In function 'get_work_pool':
|
|
||||||
kernel/workqueue.c:737:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
|
|
||||||
737 | return ((struct pool_workqueue *)
|
|
||||||
| ^
|
|
||||||
kernel/workqueue.c: In function 'get_work_pool_id':
|
|
||||||
kernel/workqueue.c:759:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
|
|
||||||
759 | return ((struct pool_workqueue *)
|
|
||||||
| ^
|
|
||||||
|
|
||||||
Change the enum definition to ensure all values can fit into
|
|
||||||
the range of 'unsigned long' on all architectures.
|
|
||||||
|
|
||||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
|
||||||
Tested-by: Thierry Reding <treding@nvidia.com>
|
|
||||||
Tested-by: Lai Jiangshan<jiangshanlai@gmail.com>
|
|
||||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
|
||||||
---
|
|
||||||
include/linux/workqueue.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/include/linux/workqueue.h
|
|
||||||
+++ b/include/linux/workqueue.h
|
|
||||||
@@ -83,7 +83,7 @@ enum {
|
|
||||||
|
|
||||||
/* convenience constants */
|
|
||||||
WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1,
|
|
||||||
- WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK,
|
|
||||||
+ WORK_STRUCT_WQ_DATA_MASK = (unsigned long)~WORK_STRUCT_FLAG_MASK,
|
|
||||||
WORK_STRUCT_NO_POOL = (unsigned long)WORK_OFFQ_POOL_NONE << WORK_OFFQ_POOL_SHIFT,
|
|
||||||
|
|
||||||
/* bit mask for work_busy() return values */
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||||
|
|
||||||
--- a/net/core/of_net.c
|
--- a/net/core/of_net.c
|
||||||
+++ b/net/core/of_net.c
|
+++ b/net/core/of_net.c
|
||||||
@@ -119,27 +119,62 @@ static int of_get_mac_addr_nvmem(struct
|
@@ -119,28 +119,63 @@ static int of_get_mac_addr_nvmem(struct
|
||||||
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
|
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
|
||||||
* but is all zeros.
|
* but is all zeros.
|
||||||
*
|
*
|
||||||
|
@ -87,3 +87,4 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||||
+ return ret;
|
+ return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(of_get_mac_address);
|
EXPORT_SYMBOL(of_get_mac_address);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
@@ -4673,6 +4673,8 @@ static int mtk_probe(struct platform_dev
|
@@ -4666,6 +4666,8 @@ static int mtk_probe(struct platform_dev
|
||||||
* for NAPI to work
|
* for NAPI to work
|
||||||
*/
|
*/
|
||||||
init_dummy_netdev(ð->dummy_dev);
|
init_dummy_netdev(ð->dummy_dev);
|
||||||
|
|
|
@ -161,7 +161,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
struct rtnl_link {
|
struct rtnl_link {
|
||||||
rtnl_doit_func doit;
|
rtnl_doit_func doit;
|
||||||
@@ -4706,7 +4706,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
|
@@ -4712,7 +4712,9 @@ int ndo_dflt_bridge_getlink(struct sk_bu
|
||||||
brport_nla_put_flag(skb, flags, mask,
|
brport_nla_put_flag(skb, flags, mask,
|
||||||
IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) ||
|
IFLA_BRPORT_MCAST_FLOOD, BR_MCAST_FLOOD) ||
|
||||||
brport_nla_put_flag(skb, flags, mask,
|
brport_nla_put_flag(skb, flags, mask,
|
||||||
|
|
|
@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4642,8 +4642,8 @@ static int mtk_probe(struct platform_dev
|
@@ -4635,8 +4635,8 @@ static int mtk_probe(struct platform_dev
|
||||||
for (i = 0; i < num_ppe; i++) {
|
for (i = 0; i < num_ppe; i++) {
|
||||||
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
|
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
if (!eth->ppe[i]) {
|
if (!eth->ppe[i]) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
@@ -4770,6 +4770,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4763,6 +4763,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
@@ -4807,6 +4808,7 @@ static const struct mtk_soc_data mt7629_
|
@@ -4800,6 +4801,7 @@ static const struct mtk_soc_data mt7629_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7629_CLKS_BITMAP,
|
.required_clks = MT7629_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4827,6 +4829,7 @@ static const struct mtk_soc_data mt7981_
|
@@ -4820,6 +4822,7 @@ static const struct mtk_soc_data mt7981_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
||||||
|
@ -88,7 +88,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
||||||
@@ -4847,6 +4850,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -4840,6 +4843,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
||||||
|
|
|
@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
/* set interrupt delays based on current Net DIM sample */
|
/* set interrupt delays based on current Net DIM sample */
|
||||||
mtk_dim_rx(ð->rx_dim.work);
|
mtk_dim_rx(ð->rx_dim.work);
|
||||||
@@ -4365,7 +4334,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4358,7 +4327,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
eth->netdev[id]->hw_features |= NETIF_F_LRO;
|
eth->netdev[id]->hw_features |= NETIF_F_LRO;
|
||||||
|
|
||||||
eth->netdev[id]->vlan_features = eth->soc->hw_features &
|
eth->netdev[id]->vlan_features = eth->soc->hw_features &
|
||||||
|
|
|
@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3989,7 +3989,10 @@ static void mtk_sgmii_destroy(struct mtk
|
@@ -3972,7 +3972,10 @@ static void mtk_sgmii_destroy(struct mtk
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
mtk_pcs_lynxi_destroy(eth->sgmii_pcs[i]);
|
mtk_pcs_lynxi_destroy(eth->sgmii_pcs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4432,7 +4435,12 @@ static int mtk_sgmii_init(struct mtk_eth
|
@@ -4425,7 +4428,12 @@ static int mtk_sgmii_init(struct mtk_eth
|
||||||
u32 flags;
|
u32 flags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
np = of_parse_phandle(eth->dev->of_node, "mediatek,sgmiisys", i);
|
np = of_parse_phandle(eth->dev->of_node, "mediatek,sgmiisys", i);
|
||||||
if (!np)
|
if (!np)
|
||||||
break;
|
break;
|
||||||
@@ -4477,6 +4485,18 @@ static int mtk_probe(struct platform_dev
|
@@ -4470,6 +4478,18 @@ static int mtk_probe(struct platform_dev
|
||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
|
||||||
eth->ip_align = NET_IP_ALIGN;
|
eth->ip_align = NET_IP_ALIGN;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
spin_lock_init(ð->page_lock);
|
spin_lock_init(ð->page_lock);
|
||||||
spin_lock_init(ð->tx_irq_lock);
|
spin_lock_init(ð->tx_irq_lock);
|
||||||
spin_lock_init(ð->rx_irq_lock);
|
spin_lock_init(ð->rx_irq_lock);
|
||||||
@@ -4662,7 +4682,7 @@ static int mtk_probe(struct platform_dev
|
@@ -4655,7 +4675,7 @@ static int mtk_probe(struct platform_dev
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -4739,6 +4759,7 @@ static const struct mtk_soc_data mt2701_
|
@@ -4732,6 +4752,7 @@ static const struct mtk_soc_data mt2701_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
|
@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4757,6 +4778,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4750,6 +4771,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 1,
|
.offload_version = 1,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
@@ -4778,6 +4800,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4771,6 +4793,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
|
@ -93,7 +93,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
@@ -4797,6 +4820,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4790,6 +4813,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.offload_version = 1,
|
.offload_version = 1,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
|
@ -101,7 +101,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
@@ -4816,6 +4840,7 @@ static const struct mtk_soc_data mt7629_
|
@@ -4809,6 +4833,7 @@ static const struct mtk_soc_data mt7629_
|
||||||
.required_clks = MT7629_CLKS_BITMAP,
|
.required_clks = MT7629_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
|
@ -109,7 +109,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma),
|
.txd_size = sizeof(struct mtk_tx_dma),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma),
|
.rxd_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -4837,6 +4862,7 @@ static const struct mtk_soc_data mt7981_
|
@@ -4830,6 +4855,7 @@ static const struct mtk_soc_data mt7981_
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
|
@ -117,7 +117,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
.txd_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
||||||
@@ -4856,6 +4882,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -4849,6 +4875,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
|
@ -125,7 +125,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
.foe_entry_size = sizeof(struct mtk_foe_entry),
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.txrx = {
|
.txrx = {
|
||||||
@@ -4874,6 +4901,7 @@ static const struct mtk_soc_data rt5350_
|
@@ -4867,6 +4894,7 @@ static const struct mtk_soc_data rt5350_
|
||||||
.hw_features = MTK_HW_FEATURES_MT7628,
|
.hw_features = MTK_HW_FEATURES_MT7628,
|
||||||
.required_clks = MT7628_CLKS_BITMAP,
|
.required_clks = MT7628_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
|
|
@ -78,7 +78,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
struct net_device *dev = eth->netdev[i];
|
struct net_device *dev = eth->netdev[i];
|
||||||
|
|
||||||
mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i));
|
mtk_w32(eth, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(i));
|
||||||
@@ -3909,7 +3909,7 @@ static void mtk_pending_work(struct work
|
@@ -3892,7 +3892,7 @@ static void mtk_pending_work(struct work
|
||||||
mtk_prepare_for_reset(eth);
|
mtk_prepare_for_reset(eth);
|
||||||
|
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
|
@ -87,7 +87,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
|
if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -3925,7 +3925,7 @@ static void mtk_pending_work(struct work
|
@@ -3908,7 +3908,7 @@ static void mtk_pending_work(struct work
|
||||||
mtk_hw_init(eth, true);
|
mtk_hw_init(eth, true);
|
||||||
|
|
||||||
/* restart DMA and enable IRQs */
|
/* restart DMA and enable IRQs */
|
||||||
|
@ -96,7 +96,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
if (!test_bit(i, &restart))
|
if (!test_bit(i, &restart))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -3953,7 +3953,7 @@ static int mtk_free_dev(struct mtk_eth *
|
@@ -3936,7 +3936,7 @@ static int mtk_free_dev(struct mtk_eth *
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
continue;
|
continue;
|
||||||
free_netdev(eth->netdev[i]);
|
free_netdev(eth->netdev[i]);
|
||||||
@@ -3972,7 +3972,7 @@ static int mtk_unreg_dev(struct mtk_eth
|
@@ -3955,7 +3955,7 @@ static int mtk_unreg_dev(struct mtk_eth
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
struct mtk_mac *mac;
|
struct mtk_mac *mac;
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
continue;
|
continue;
|
||||||
@@ -4277,7 +4277,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4259,7 +4259,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
}
|
}
|
||||||
|
|
||||||
id = be32_to_cpup(_id);
|
id = be32_to_cpup(_id);
|
||||||
|
@ -123,7 +123,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
dev_err(eth->dev, "%d is not a valid mac id\n", id);
|
dev_err(eth->dev, "%d is not a valid mac id\n", id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -4407,7 +4407,7 @@ void mtk_eth_set_dma_device(struct mtk_e
|
@@ -4400,7 +4400,7 @@ void mtk_eth_set_dma_device(struct mtk_e
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
dev = eth->netdev[i];
|
dev = eth->netdev[i];
|
||||||
|
|
||||||
if (!dev || !(dev->flags & IFF_UP))
|
if (!dev || !(dev->flags & IFF_UP))
|
||||||
@@ -4734,7 +4734,7 @@ static int mtk_remove(struct platform_de
|
@@ -4727,7 +4727,7 @@ static int mtk_remove(struct platform_de
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* stop all devices to make sure that dma is properly shut down */
|
/* stop all devices to make sure that dma is properly shut down */
|
||||||
|
|
|
@ -182,7 +182,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||||
/* PSE should not drop port8 and port9 packets from WDMA Tx */
|
/* PSE should not drop port8 and port9 packets from WDMA Tx */
|
||||||
mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
|
mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
|
||||||
|
|
||||||
@@ -4314,7 +4379,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4307,7 +4372,11 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
}
|
}
|
||||||
spin_lock_init(&mac->hw_stats->stats_lock);
|
spin_lock_init(&mac->hw_stats->stats_lock);
|
||||||
u64_stats_init(&mac->hw_stats->syncp);
|
u64_stats_init(&mac->hw_stats->syncp);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue