This commit is contained in:
DHDAXCW
2024-01-18 13:09:08 +08:00
parent b57e8d8a6e
commit 388fc6082e
260 changed files with 12201 additions and 1269 deletions

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .136
LINUX_KERNEL_HASH-5.15.136 = c624b9fe7ee4708d34cfd0b7ebc58037afac7463338cc498641ea31c55eeacb8
LINUX_VERSION-5.15 = .147
LINUX_KERNEL_HASH-5.15.147 = 56c1e65625d201db431efda7a3816e7b424071e7cb0245b2ba594d15b1fdfcd4

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .69
LINUX_KERNEL_HASH-6.1.69 = 7e3d2694d18ce502068cc88a430da809abbd17d0773268524ebece442612b541
LINUX_VERSION-6.1 = .73
LINUX_KERNEL_HASH-6.1.73 = 6cad48706bf1cde342613dca2a2cd6dd4f79f88f9e4d356263564e4b2a5d7e87

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .2
LINUX_KERNEL_HASH-6.6.2 = 73d4f6ad8dd6ac2a41ed52c2928898b7c3f2519ed5dbdb11920209a36999b77e
LINUX_VERSION-6.6 = .10
LINUX_KERNEL_HASH-6.6.10 = 9ee627e4c109aec7fca3eda5898e81d201af2c7eb2f7d9d7d94c1f0e1205546c

View File

@@ -86,6 +86,13 @@ define Package/rtl8723bu-firmware/install
endef
$(eval $(call BuildPackage,rtl8723bu-firmware))
Package/rtl8723de-firmware = $(call Package/firmware-default,RealTek RTL8723DE firmware)
define Package/rtl8723de-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8723d_fw.bin $(1)/lib/firmware/rtw88
endef
$(eval $(call BuildPackage,rtl8723de-firmware))
Package/rtl8761a-firmware = $(call Package/firmware-default,RealTek RTL8761A firmware)
define Package/rtl8761a-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtl_bt
@@ -109,16 +116,6 @@ define Package/rtl8761bu-firmware/install
endef
$(eval $(call BuildPackage,rtl8761bu-firmware))
Package/realtek-bluetooth-firmware = $(call Package/firmware-default,RealTek bluetooth firmware)
define Package/realtek-bluetooth-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtl_bt
$(CP) \
$(PKG_BUILD_DIR)/rtl_bt/* \
$(1)/lib/firmware/rtl_bt
endef
$(eval $(call BuildPackage,realtek-bluetooth-firmware))
Package/rtl8821ae-firmware = $(call Package/firmware-default,RealTek RTL8821AE firmware)
define Package/rtl8821ae-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
@@ -127,19 +124,12 @@ define Package/rtl8821ae-firmware/install
endef
$(eval $(call BuildPackage,rtl8821ae-firmware))
Package/rtl8723d-firmware = $(call Package/firmware-default,RealTek RTL8723D firmware)
define Package/rtl8723d-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8723d_fw.bin $(1)/lib/firmware/rtw88
endef
$(eval $(call BuildPackage,rtl8723d-firmware))
Package/rtl8821c-firmware = $(call Package/firmware-default,RealTek RTL8822BE firmware)
define Package/rtl8821c-firmware/install
Package/rtl8821ce-firmware = $(call Package/firmware-default,RealTek RTL8821CE firmware)
define Package/rtl8821ce-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw88/rtw8821c_fw.bin $(1)/lib/firmware/rtw88
endef
$(eval $(call BuildPackage,rtl8821c-firmware))
$(eval $(call BuildPackage,rtl8821ce-firmware))
Package/rtl8822be-firmware = $(call Package/firmware-default,RealTek RTL8822BE firmware)
define Package/rtl8822be-firmware/install
@@ -156,11 +146,31 @@ define Package/rtl8822ce-firmware/install
endef
$(eval $(call BuildPackage,rtl8822ce-firmware))
Package/rtw89-firmware = $(call Package/firmware-default,RealTek RTW89 firmware)
define Package/rtw89-firmware/install
Package/rtl8851be-firmware = $(call Package/firmware-default,RealTek RTL8851BE firmware)
define Package/rtl8851be-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(CP) \
$(PKG_BUILD_DIR)/rtw89/* \
$(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8851b_fw.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtw89-firmware))
$(eval $(call BuildPackage,rtl8851be-firmware))
Package/rtl8852ae-firmware = $(call Package/firmware-default,RealTek RTL8852AE firmware)
define Package/rtl8852ae-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852a_fw.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8852ae-firmware))
Package/rtl8852be-firmware = $(call Package/firmware-default,RealTek RTL8852BE firmware)
define Package/rtl8852be-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852b_fw.bin $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852b_fw-1.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8852be-firmware))
Package/rtl8852ce-firmware = $(call Package/firmware-default,RealTek RTL8852CE firmware)
define Package/rtl8852ce-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/rtw89
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtw89/rtw8852c_fw.bin $(1)/lib/firmware/rtw89
endef
$(eval $(call BuildPackage,rtl8852ce-firmware))

View File

@@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=cryptodev-linux
PKG_VERSION:=1.12
PKG_VERSION:=1.13
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
PKG_HASH:=33b7915c46eb39a37110e88c681423c0dd0df25d784b6e1475ac3196367f0db5
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING

View File

@@ -0,0 +1,41 @@
From 99ae2a39ddc3f89c66d9f09783b591c0f2dbf2e9 Mon Sep 17 00:00:00 2001
From: Gaurav Jain <gaurav.jain@nxp.com>
Date: Wed, 28 Jun 2023 12:44:32 +0530
Subject: [PATCH] cryptodev_verbosity: Fix build for Linux 6.4
register_sysctl_table api is removed in kernel.
migrate to the new api register_sysctl.
child is also removed in linux 6.4 ctl_table struct.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
---
ioctl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ioctl.c b/ioctl.c
index 8f241b86..4262bbd5 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -1246,7 +1246,9 @@ static struct ctl_table verbosity_ctl_root[] = {
{
.procname = "ioctl",
.mode = 0555,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
.child = verbosity_ctl_dir,
+#endif
},
{},
};
@@ -1267,7 +1269,11 @@ static int __init init_cryptodev(void)
return rc;
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
+#else
+ verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
+#endif
pr_info(PFX "driver %s loaded.\n", VERSION);

View File

@@ -0,0 +1,34 @@
From 592017c3a910a3905b1925aee88c4674e9a596b7 Mon Sep 17 00:00:00 2001
From: Gaurav Jain <gaurav.jain@nxp.com>
Date: Tue, 30 May 2023 17:09:42 +0530
Subject: [PATCH] zero copy: Fix build for Linux 6.4
get_user_pages_remote api prototype is changed in kernel.
struct vm_area_struct **vmas argument is removed.
Migrate to the new API.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
---
zc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/zc.c b/zc.c
index fdf7da17..6637945a 100644
--- a/zc.c
+++ b/zc.c
@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
ret = get_user_pages_remote(task, mm,
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
pg, NULL, NULL);
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
ret = get_user_pages_remote(mm,
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
pg, NULL, NULL);
+#else
+ ret = get_user_pages_remote(mm,
+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
+ pg, NULL);
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
up_read(&mm->mmap_sem);

View File

@@ -0,0 +1,60 @@
From bb8bc7cf60d2c0b097c8b3b0e807f805b577a53f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
Date: Mon, 3 Jul 2023 00:46:02 +0000
Subject: [PATCH] Move recent Linux version #ifdefs from v6.4 to v6.5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The latest commits, meant to fix the build on Linux 6.4, are actually
fixing the build for API changes introduced in the merge window of the
yet-unreleased Linux 6.5, and actually break the build for Linux 6.4.
In particular, the upstream commits introducing the API changes are the
following, which are *not* included in the Linux v6.4 tag:
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19c4e618a1bc3d0cad1f04c857be8076cb05bbb2
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca5e863233e8f6acd1792fd85d6bc2729a1b2c10
Change to #ifdef's to v6.5, where they will most likely be included.
Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
---
ioctl.c | 4 ++--
zc.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ioctl.c b/ioctl.c
index 4262bbd..e3eefe1 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_root[] = {
{
.procname = "ioctl",
.mode = 0555,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
.child = verbosity_ctl_dir,
#endif
},
@@ -1269,7 +1269,7 @@ static int __init init_cryptodev(void)
return rc;
}
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
#else
verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
diff --git a/zc.c b/zc.c
index 6637945..00e00c1 100644
--- a/zc.c
+++ b/zc.c
@@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
ret = get_user_pages_remote(task, mm,
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
pg, NULL, NULL);
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
ret = get_user_pages_remote(mm,
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
pg, NULL, NULL);

View File

@@ -0,0 +1,35 @@
From 5e7121e45ff283d30097da381fd7e97c4bb61364 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
Date: Sun, 10 Dec 2023 13:57:55 +0000
Subject: [PATCH] Fix build for Linux 6.7-rc1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since Linux 6.7-rc1, no ahash algorithms set a nonzero alignmask,
and therefore `crypto_ahash_alignmask` has been removed.
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f8660c82b79af595b056f6b9f4f227edeb88574
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626910f3f1bbce6ad18bc613d895d2a089ed95e
Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
---
cryptlib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cryptlib.c b/cryptlib.c
index 4d739e5..0e59d4c 100644
--- a/cryptlib.c
+++ b/cryptlib.c
@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name,
}
hdata->digestsize = crypto_ahash_digestsize(hdata->async.s);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0))
hdata->alignmask = crypto_ahash_alignmask(hdata->async.s);
+#else
+ hdata->alignmask = 0;
+#endif
init_completion(&hdata->async.result.completion);

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2008-2012 OpenWrt.org
# Copyright (C) 2008-2024 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.

View File

@@ -242,11 +242,11 @@ static int gpio_button_get_value(struct gpio_keys_button_data *bdata)
int val;
if (bdata->can_sleep)
val = !!gpio_get_value_cansleep(bdata->b->gpio);
val = !!gpiod_get_value_cansleep(bdata->gpiod);
else
val = !!gpio_get_value(bdata->b->gpio);
val = !!gpiod_get_value(bdata->gpiod);
return val ^ bdata->b->active_low;
return val;
}
static void gpio_keys_handle_button(struct gpio_keys_button_data *bdata)
@@ -365,7 +365,6 @@ gpio_keys_get_devtree_pdata(struct device *dev)
struct device_node *node, *pp;
struct gpio_keys_platform_data *pdata;
struct gpio_keys_button *button;
int error;
int nbuttons;
int i = 0;
@@ -375,14 +374,12 @@ gpio_keys_get_devtree_pdata(struct device *dev)
nbuttons = of_get_child_count(node);
if (nbuttons == 0)
return NULL;
return ERR_PTR(-EINVAL);
pdata = devm_kzalloc(dev, sizeof(*pdata) + nbuttons * (sizeof *button),
GFP_KERNEL);
if (!pdata) {
error = -ENOMEM;
goto err_out;
}
if (!pdata)
return ERR_PTR(-ENOMEM);
pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
pdata->nbuttons = nbuttons;
@@ -391,37 +388,13 @@ gpio_keys_get_devtree_pdata(struct device *dev)
of_property_read_u32(node, "poll-interval", &pdata->poll_interval);
for_each_child_of_node(node, pp) {
enum of_gpio_flags flags;
if (!of_find_property(pp, "gpios", NULL)) {
pdata->nbuttons--;
dev_warn(dev, "Found button without gpios\n");
continue;
}
button = (struct gpio_keys_button *)(&pdata->buttons[i++]);
button->irq = irq_of_parse_and_map(pp, 0);
button->gpio = of_get_gpio_flags(pp, 0, &flags);
if (button->gpio < 0) {
error = button->gpio;
if (error != -ENOENT) {
if (error != -EPROBE_DEFER)
dev_err(dev,
"Failed to get gpio flags, error: %d\n",
error);
return ERR_PTR(error);
}
} else {
button->active_low = !!(flags & OF_GPIO_ACTIVE_LOW);
}
if (of_property_read_u32(pp, "linux,code", &button->code)) {
dev_err(dev, "Button without keycode: 0x%x\n",
button->gpio);
error = -EINVAL;
goto err_out;
dev_err(dev, "Button node '%s' without keycode\n",
pp->full_name);
of_node_put(pp);
return ERR_PTR(-EINVAL);
}
button->desc = of_get_property(pp, "label", NULL);
@@ -434,17 +407,12 @@ gpio_keys_get_devtree_pdata(struct device *dev)
if (of_property_read_u32(pp, "debounce-interval",
&button->debounce_interval))
button->debounce_interval = 5;
}
if (pdata->nbuttons == 0) {
error = -EINVAL;
goto err_out;
button->irq = irq_of_parse_and_map(pp, 0);
button->gpio = -ENOENT; /* mark this as device-tree */
}
return pdata;
err_out:
return ERR_PTR(error);
}
static struct of_device_id gpio_keys_of_match[] = {
@@ -471,11 +439,12 @@ gpio_keys_get_devtree_pdata(struct device *dev)
static int gpio_keys_button_probe(struct platform_device *pdev,
struct gpio_keys_button_dev **_bdev, int polled)
{
struct gpio_keys_platform_data *pdata = pdev->dev.platform_data;
struct device *dev = &pdev->dev;
struct gpio_keys_platform_data *pdata = dev_get_platdata(dev);
struct gpio_keys_button_dev *bdev;
struct gpio_keys_button *buttons;
int error;
struct device_node *prev = NULL;
int error = 0;
int i;
if (!pdata) {
@@ -514,46 +483,79 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
for (i = 0; i < pdata->nbuttons; i++) {
struct gpio_keys_button *button = &buttons[i];
struct gpio_keys_button_data *bdata = &bdev->data[i];
unsigned int gpio = button->gpio;
const char *desc = button->desc ? button->desc : DRV_NAME;
if (button->wakeup) {
dev_err(dev, "does not support wakeup\n");
return -EINVAL;
error = -EINVAL;
goto out;
}
bdata->map_entry = button_get_index(button->code);
if (bdata->map_entry < 0) {
dev_warn(dev, "does not support key code:%u\n",
dev_err(dev, "does not support key code:%u\n",
button->code);
continue;
error = -EINVAL;
goto out;
}
if (!(button->type == 0 || button->type == EV_KEY ||
button->type == EV_SW)) {
dev_warn(dev, "only supports buttons or switches\n");
dev_err(dev, "only supports buttons or switches\n");
error = -EINVAL;
goto out;
}
if (button->irq) {
dev_err(dev, "skipping button %s (only gpio buttons supported)\n",
button->desc);
bdata->b = &pdata->buttons[i];
continue;
}
error = devm_gpio_request(dev, gpio,
button->desc ? button->desc : DRV_NAME);
if (error) {
dev_err(dev, "unable to claim gpio %u, err=%d\n",
gpio, error);
return error;
}
bdata->gpiod = gpio_to_desc(gpio);
if (!bdata->gpiod)
return -EINVAL;
if (gpio_is_valid(button->gpio)) {
/* legacy platform data... but is it the lookup table? */
bdata->gpiod = devm_gpiod_get_index(dev, desc, i,
GPIOD_IN);
if (IS_ERR(bdata->gpiod)) {
/* or the legacy (button->gpio is good) way? */
error = devm_gpio_request_one(dev,
button->gpio, GPIOF_IN | (
button->active_low ? GPIOF_ACTIVE_LOW :
0), desc);
if (error) {
if (error != -EPROBE_DEFER) {
dev_err(dev, "unable to claim gpio %d, err=%d\n",
button->gpio, error);
}
goto out;
}
error = gpio_direction_input(gpio);
if (error) {
dev_err(dev,
"unable to set direction on gpio %u, err=%d\n",
gpio, error);
return error;
bdata->gpiod = gpio_to_desc(button->gpio);
}
} else {
/* Device-tree */
struct device_node *child =
of_get_next_child(dev->of_node, prev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
bdata->gpiod = devm_fwnode_gpiod_get(dev,
of_fwnode_handle(child), "gpios", GPIOD_IN,
desc);
#else
bdata->gpiod = devm_gpiod_get_from_of_node(dev,
child, "gpios", 0, GPIOD_IN, desc);
#endif
prev = child;
}
bdata->can_sleep = gpio_cansleep(gpio);
if (IS_ERR_OR_NULL(bdata->gpiod)) {
error = IS_ERR(bdata->gpiod) ? PTR_ERR(bdata->gpiod) :
-EINVAL;
goto out;
}
bdata->can_sleep = gpiod_cansleep(bdata->gpiod);
bdata->last_state = -1; /* Unknown state on boot */
if (bdev->polled) {
@@ -584,8 +586,11 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
platform_set_drvdata(pdev, bdev);
*_bdev = bdev;
error = 0;
return 0;
out:
of_node_put(prev);
return error;
}
static int gpio_keys_probe(struct platform_device *pdev)
@@ -594,9 +599,7 @@ static int gpio_keys_probe(struct platform_device *pdev)
struct gpio_keys_button_dev *bdev;
int ret, i;
ret = gpio_keys_button_probe(pdev, &bdev, 0);
if (ret)
return ret;
@@ -608,12 +611,8 @@ static int gpio_keys_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&bdata->work, gpio_keys_irq_work_func);
if (!bdata->gpiod)
continue;
if (!button->irq) {
bdata->irq = gpio_to_irq(button->gpio);
bdata->irq = gpiod_to_irq(bdata->gpiod);
if (bdata->irq < 0) {
dev_err(&pdev->dev, "failed to get irq for gpio:%d\n",
button->gpio);
@@ -631,7 +630,6 @@ static int gpio_keys_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(&pdev->dev,
bdata->irq, NULL, button_handle_irq,
irqflags, dev_name(&pdev->dev), bdata);
if (ret < 0) {
bdata->irq = 0;
dev_err(&pdev->dev, "failed to request irq:%d for gpio:%d\n",
@@ -653,14 +651,12 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
int ret;
ret = gpio_keys_button_probe(pdev, &bdev, 1);
if (ret)
return ret;
INIT_DELAYED_WORK(&bdev->work, gpio_keys_polled_poll);
pdata = bdev->pdata;
if (pdata->enable)
pdata->enable(bdev->dev);

View File

@@ -39,7 +39,8 @@ define KernelPackage/crypto-aead
TITLE:=CryptoAPI AEAD support
KCONFIG:= \
CONFIG_CRYPTO_AEAD \
CONFIG_CRYPTO_AEAD2
CONFIG_CRYPTO_AEAD2 \
CONFIG_CRYPTO_GENIV
FILES:= \
$(LINUX_DIR)/crypto/aead.ko \
$(LINUX_DIR)/crypto/geniv.ko@ge5.10

View File

@@ -715,6 +715,7 @@ define KernelPackage/sched-core
CONFIG_NET_ACT_GACT \
CONFIG_NET_ACT_MIRRED \
CONFIG_NET_ACT_SKBEDIT \
CONFIG_NET_ACT_SKBMOD \
CONFIG_NET_CLS_MATCHALL \
CONFIG_NET_EMATCH=y \
CONFIG_NET_EMATCH_U32
@@ -908,10 +909,26 @@ endef
$(eval $(call KernelPackage,sched-ipset))
define KernelPackage/sched-mqprio-common
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=mqprio queue common dependencies support
DEPENDS:=@LINUX_6_6
HIDDEN:=1
KCONFIG:=CONFIG_NET_SCH_MQPRIO_LIB
FILES:=$(LINUX_DIR)/net/sched/sch_mqprio_lib.ko
endef
define KernelPackage/sched-mqprio-common/description
Common library for manipulating mqprio queue configurations
endef
$(eval $(call KernelPackage,sched-mqprio-common))
define KernelPackage/sched-mqprio
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Multi-queue priority scheduler (MQPRIO)
DEPENDS:=+kmod-sched-core
DEPENDS:=+kmod-sched-core +LINUX_6_6:kmod-sched-mqprio-common
KCONFIG:=CONFIG_NET_SCH_MQPRIO
FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko
AUTOLOAD:=$(call AutoProbe, sch_mqprio)
@@ -982,7 +999,7 @@ endef
$(eval $(call KernelPackage,bpf-test))
SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq sch_teql sch_fq act_pedit act_simple act_csum em_cmp em_nbyte em_meta em_text
SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq sch_teql sch_fq act_pedit act_simple act_skbmod act_csum em_cmp em_nbyte em_meta em_text
SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
define KernelPackage/sched
@@ -991,7 +1008,7 @@ define KernelPackage/sched
DEPENDS:=+kmod-sched-core +kmod-lib-crc32c +kmod-lib-textsearch
KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \
CONFIG_NET_SCH_DSMARK@lt6.2 \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \
CONFIG_NET_SCH_SFQ \
@@ -1005,7 +1022,8 @@ define KernelPackage/sched
CONFIG_NET_EMATCH_META \
CONFIG_NET_EMATCH_TEXT
FILES:=$(SCHED_FILES_EXTRA)
AUTOLOAD:=$(call AutoLoad,73, $(SCHED_MODULES_EXTRA))
FILES+=$(LINUX_DIR)/net/sched/sch_dsmark.ko@lt6.2
AUTOLOAD:=$(call AutoLoad,73, $(SCHED_MODULES_EXTRA) sch_dsmark@lt6.2)
endef
define KernelPackage/sched/description

View File

@@ -1,7 +1,9 @@
PKG_DRIVERS += \
rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common \
rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723bs rtl8821ae \
rtl8xxxu rtw88 rtw89
rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-8821c rtw88-8822b rtw88-8822c \
rtw88-8723d rtw88-8821ce rtw88-8821cu rtw88-8822be rtw88-8822bu \
rtw88-8822ce rtw88-8822cu rtw88-8723de
config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI
config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI
@@ -21,17 +23,23 @@ config-y += RTL8XXXU_UNTESTED
config-$(call config_package,rtl8723bs) += RTL8723BS
config-y += STAGING
config-$(call config_package,rtw88) += RTW88 RTW88_CORE RTW88_PCI RTW88_USB
config-y += RTW88_8821CE RTW88_8821CU RTW88_8822CU RTW88_8822BE RTW88_8822BU RTW88_8822CE RTW88_8723DE RTW88_8723DU
config-$(call config_package,rtw88) += RTW88 RTW88_CORE
config-$(call config_package,rtw88-pci) += RTW88_PCI
config-$(call config_package,rtw88-usb) += RTW88_USB
config-$(call config_package,rtw88-8821c) += RTW88_8821C
config-$(call config_package,rtw88-8821ce) += RTW88_8821CE
config-$(call config_package,rtw88-8821cu) += RTW88_8821CU
config-$(call config_package,rtw88-8822b) += RTW88_8822B
config-$(call config_package,rtw88-8822be) += RTW88_8822BE
config-$(call config_package,rtw88-8822bu) += RTW88_8822BU
config-$(call config_package,rtw88-8822c) += RTW88_8822C
config-$(call config_package,rtw88-8822ce) += RTW88_8822CE
config-$(call config_package,rtw88-8822cu) += RTW88_8822CU
config-$(call config_package,rtw88-8723d) += RTW88_8723D
config-$(call config_package,rtw88-8723de) += RTW88_8723DE
config-$(CONFIG_PACKAGE_RTW88_DEBUG) += RTW88_DEBUG
config-$(CONFIG_PACKAGE_RTW88_DEBUGFS) += RTW88_DEBUGFS
config-$(call config_package,rtw89) += RTW89 RTW89_CORE RTW89_PCI
config-y += RTW89_8852AE RTW89_8852BE RTW89_8852CE
config-$(CONFIG_PACKAGE_RTW89_DEBUG) += RTW89_DEBUG
config-$(CONFIG_PACKAGE_RTW89_DEBUGFS) += RTW89_DEBUGFS
config-$(CONFIG_PACKAGE_RTW89_DEBUGMSG) += RTW89_DEBUGMSG
define KernelPackage/rtlwifi/config
config PACKAGE_RTLWIFI_DEBUG
bool "Realtek wireless debugging"
@@ -174,62 +182,121 @@ endef
define KernelPackage/rtw88
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822BE/BU/RTL8822CE/BU/RTL8723DE/DU/RTL8821CU
DEPENDS+= @(PCI_SUPPORT) +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@USB_SUPPORT +kmod-usb-core
FILES:=\
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821ce.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821cu.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822cu.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723du.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8821ce rtw88_8821cu rtw88_8822cu rtw88_8822be rtw88_8822ce rtw88_8723de rtw88_8822bu rtw88_8723du)
TITLE:=Realtek RTW88 common part
DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_core.ko
AUTOLOAD:=$(call AutoProbe,rtw88_core)
HIDDEN:=1
endef
define KernelPackage/rtw89/config
config PACKAGE_RTW89_DEBUG
bool "Realtek wireless debugging (rtw89)"
depends on PACKAGE_kmod-rtw89
help
Enable debugging output for rtw89 devices
config PACKAGE_RTW89_DEBUGFS
bool "Enable rtw89 debugfs support"
select KERNEL_DEBUG_FS
depends on PACKAGE_kmod-rtw89
help
Select this to see extensive information about
the internal state of rtw89 in debugfs.
config PACKAGE_RTW89_DEBUGMSG
bool "Realtek rtw89 debug message support"
depends on PACKAGE_kmod-rtw89
help
Enable debug message support
endef
define KernelPackage/rtw89
define KernelPackage/rtw88-pci
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8852AE/BE/CE
DEPENDS+= @(PCI_SUPPORT) +kmod-mac80211 +@DRIVER_11AX_SUPPORT +rtw89-firmware
FILES:=\
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852a.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852ae.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852b.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852be.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852c.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_8852ce.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_core.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw89/rtw89_pci.ko
AUTOLOAD:=$(call AutoProbe,rtw89_8852ae rtw89_8852be rtw89_8852ce)
TITLE:=Realtek RTW88 PCI chips support
DEPENDS+= @PCI_SUPPORT +kmod-rtw88
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko
AUTOLOAD:=$(call AutoProbe,rtw88_pci)
HIDDEN:=1
endef
define KernelPackage/rtw88-usb
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTW88 USB chips support
DEPENDS+= @USB_SUPPORT +kmod-rtw88 +kmod-usb-core
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko
AUTOLOAD:=$(call AutoProbe,rtw88_usb)
HIDDEN:=1
endef
define KernelPackage/rtw88-8821c
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8821C family support
DEPENDS+= +kmod-rtw88 +rtl8821ce-firmware +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821c.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8821c)
HIDDEN:=1
endef
define KernelPackage/rtw88-8822b
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822B family support
DEPENDS+= +kmod-rtw88 +rtl8822be-firmware +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822b)
HIDDEN:=1
endef
define KernelPackage/rtw88-8822c
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822C family support
DEPENDS+= +kmod-rtw88 +rtl8822ce-firmware +@DRIVER_11AC_SUPPORT
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822c)
HIDDEN:=1
endef
define KernelPackage/rtw88-8723d
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8723D family support
DEPENDS+= +kmod-rtw88 +rtl8723de-firmware
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723d.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8723d)
HIDDEN:=1
endef
define KernelPackage/rtw88-8821ce
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8821CE support
DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8821c
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821ce.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8821ce)
endef
define KernelPackage/rtw88-8821cu
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8821CU support
DEPENDS+= +kmod-rtw88-usb +kmod-rtw88-8821c
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8821cu.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8821cu)
endef
define KernelPackage/rtw88-8822be
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822BE support
DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8822b
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822be.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822be)
endef
define KernelPackage/rtw88-8822bu
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822BU support
DEPENDS+= +kmod-rtw88-usb +kmod-rtw88-8822b
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822bu)
endef
define KernelPackage/rtw88-8822ce
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822CE support
DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8822c
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822ce)
endef
define KernelPackage/rtw88-8822cu
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8822CU support
DEPENDS+= +kmod-rtw88-usb +kmod-rtw88-8822c
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8822cu.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8822cu)
endef
define KernelPackage/rtw88-8723de
$(call KernelPackage/mac80211/Default)
TITLE:=Realtek RTL8723DE support
DEPENDS+= +kmod-rtw88-pci +kmod-rtw88-8723d
FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtw88/rtw88_8723de.ko
AUTOLOAD:=$(call AutoProbe,rtw88_8723)
endef
define KernelPackage/rtl8723bs

View File

@@ -329,7 +329,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -999,23 +999,13 @@ static inline void update_mmu_cache(stru
@@ -1005,23 +1005,13 @@ static inline void update_mmu_cache(stru
* page after fork() + CoW for pfn mappings. We don't always have a
* hardware-managed access flag on arm64.
*/

View File

@@ -73,7 +73,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1295,6 +1295,14 @@ config ARCH_HAS_ELFCORE_COMPAT
@@ -1298,6 +1298,14 @@ config ARCH_HAS_ELFCORE_COMPAT
config ARCH_HAS_PARANOID_L1D_FLUSH
bool
@@ -90,7 +90,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
source "scripts/gcc-plugins/Kconfig"
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -84,6 +84,7 @@ config X86
@@ -85,6 +85,7 @@ config X86
select ARCH_HAS_PMEM_API if X86_64
select ARCH_HAS_PTE_DEVMAP if X86_64
select ARCH_HAS_PTE_SPECIAL

View File

@@ -594,7 +594,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5178,6 +5178,7 @@ static void __mem_cgroup_free(struct mem
@@ -5179,6 +5179,7 @@ static void __mem_cgroup_free(struct mem
static void mem_cgroup_free(struct mem_cgroup *memcg)
{
@@ -602,7 +602,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
memcg_wb_domain_exit(memcg);
__mem_cgroup_free(memcg);
}
@@ -5241,6 +5242,7 @@ static struct mem_cgroup *mem_cgroup_all
@@ -5242,6 +5243,7 @@ static struct mem_cgroup *mem_cgroup_all
memcg->deferred_split_queue.split_queue_len = 0;
#endif
idr_replace(&mem_cgroup_idr, memcg, memcg->id.id);

View File

@@ -110,7 +110,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -442,6 +442,7 @@ static inline struct obj_cgroup *__page_
@@ -447,6 +447,7 @@ static inline struct obj_cgroup *__page_
* - LRU isolation
* - lock_page_memcg()
* - exclusive reference
@@ -118,7 +118,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
*
* For a kmem page a caller should hold an rcu read lock to protect memcg
* associated with a kmem page from being released.
@@ -497,6 +498,7 @@ static inline struct mem_cgroup *page_me
@@ -502,6 +503,7 @@ static inline struct mem_cgroup *page_me
* - LRU isolation
* - lock_page_memcg()
* - exclusive reference
@@ -126,7 +126,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
*
* For a kmem page a caller should hold an rcu read lock to protect memcg
* associated with a kmem page from being released.
@@ -953,6 +955,23 @@ void unlock_page_memcg(struct page *page
@@ -958,6 +960,23 @@ void unlock_page_memcg(struct page *page
void __mod_memcg_state(struct mem_cgroup *memcg, int idx, int val);
@@ -150,7 +150,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/* idx can be of type enum memcg_stat_item or node_stat_item */
static inline void mod_memcg_state(struct mem_cgroup *memcg,
int idx, int val)
@@ -1369,6 +1388,18 @@ static inline void unlock_page_memcg(str
@@ -1374,6 +1393,18 @@ static inline void unlock_page_memcg(str
{
}

View File

@@ -167,7 +167,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
BUG_ON(active_mm != old_mm);
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -348,6 +348,11 @@ struct mem_cgroup {
@@ -353,6 +353,11 @@ struct mem_cgroup {
struct deferred_split deferred_split_queue;
#endif
@@ -382,7 +382,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
}
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1083,6 +1083,7 @@ static struct mm_struct *mm_init(struct
@@ -1091,6 +1091,7 @@ static struct mm_struct *mm_init(struct
goto fail_nocontext;
mm->user_ns = get_user_ns(user_ns);
@@ -390,7 +390,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
return mm;
fail_nocontext:
@@ -1125,6 +1126,7 @@ static inline void __mmput(struct mm_str
@@ -1133,6 +1134,7 @@ static inline void __mmput(struct mm_str
}
if (mm->binfmt)
module_put(mm->binfmt->module);
@@ -398,7 +398,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mmdrop(mm);
}
@@ -2622,6 +2624,13 @@ pid_t kernel_clone(struct kernel_clone_a
@@ -2625,6 +2627,13 @@ pid_t kernel_clone(struct kernel_clone_a
get_task_struct(p);
}
@@ -414,7 +414,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/* forking complete and child started to run, tell ptracer */
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5010,6 +5010,7 @@ context_switch(struct rq *rq, struct tas
@@ -5014,6 +5014,7 @@ context_switch(struct rq *rq, struct tas
* finish_task_switch()'s mmdrop().
*/
switch_mm_irqs_off(prev->active_mm, next->mm, next);
@@ -424,7 +424,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
/* will mmdrop() in finish_task_switch(). */
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6212,6 +6212,30 @@ static void mem_cgroup_move_task(void)
@@ -6213,6 +6213,30 @@ static void mem_cgroup_move_task(void)
}
#endif
@@ -455,7 +455,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
static int seq_puts_memcg_tunable(struct seq_file *m, unsigned long value)
{
if (value == PAGE_COUNTER_MAX)
@@ -6555,6 +6579,7 @@ struct cgroup_subsys memory_cgrp_subsys
@@ -6556,6 +6580,7 @@ struct cgroup_subsys memory_cgrp_subsys
.css_reset = mem_cgroup_css_reset,
.css_rstat_flush = mem_cgroup_css_rstat_flush,
.can_attach = mem_cgroup_can_attach,

View File

@@ -69,7 +69,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -818,6 +818,11 @@ static inline void obj_cgroup_put(struct
@@ -823,6 +823,11 @@ static inline void obj_cgroup_put(struct
percpu_ref_put(&objcg->refcnt);
}
@@ -81,7 +81,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
static inline void mem_cgroup_put(struct mem_cgroup *memcg)
{
if (memcg)
@@ -1283,6 +1288,11 @@ struct mem_cgroup *mem_cgroup_from_css(s
@@ -1288,6 +1293,11 @@ struct mem_cgroup *mem_cgroup_from_css(s
return NULL;
}
@@ -318,7 +318,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mctz = soft_limit_tree_from_page(page);
if (!mctz)
return;
@@ -3433,6 +3443,9 @@ unsigned long mem_cgroup_soft_limit_recl
@@ -3434,6 +3444,9 @@ unsigned long mem_cgroup_soft_limit_recl
unsigned long excess;
unsigned long nr_scanned;
@@ -328,7 +328,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
if (order > 0)
return 0;
@@ -5321,6 +5334,7 @@ static int mem_cgroup_css_online(struct
@@ -5322,6 +5335,7 @@ static int mem_cgroup_css_online(struct
if (unlikely(mem_cgroup_is_root(memcg)))
queue_delayed_work(system_unbound_wq, &stats_flush_dwork,
2UL*HZ);
@@ -336,7 +336,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
return 0;
}
@@ -5347,6 +5361,7 @@ static void mem_cgroup_css_offline(struc
@@ -5348,6 +5362,7 @@ static void mem_cgroup_css_offline(struc
memcg_offline_kmem(memcg);
reparent_shrinker_deferred(memcg);
wb_memcg_offline(memcg);
@@ -344,7 +344,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drain_all_stock(memcg);
@@ -5358,6 +5373,7 @@ static void mem_cgroup_css_released(stru
@@ -5359,6 +5374,7 @@ static void mem_cgroup_css_released(stru
struct mem_cgroup *memcg = mem_cgroup_from_css(css);
invalidate_reclaim_iterators(memcg);

View File

@@ -24,7 +24,7 @@ Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
L: bpf@vger.kernel.org
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -57,7 +57,6 @@ config MIPS
@@ -58,7 +58,6 @@ config MIPS
select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
select HAVE_ASM_MODVERSIONS
@@ -32,7 +32,7 @@ Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
select HAVE_CONTEXT_TRACKING
select HAVE_TIF_NOHZ
select HAVE_C_RECORDMCOUNT
@@ -65,7 +64,10 @@ config MIPS
@@ -66,7 +65,10 @@ config MIPS
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_DMA_CONTIGUOUS
select HAVE_DYNAMIC_FTRACE

View File

@@ -37,7 +37,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
map->format.buf_size = DIV_ROUND_UP(config->reg_bits +
config->val_bits + config->pad_bits, 8);
@@ -1735,6 +1736,7 @@ static int _regmap_raw_write_impl(struct
@@ -1737,6 +1738,7 @@ static int _regmap_raw_write_impl(struct
return ret;
}
@@ -45,7 +45,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
map->format.format_reg(map->work_buf, reg, map->reg_shift);
regmap_set_work_buf_flag_mask(map, map->format.reg_bytes,
map->write_flag_mask);
@@ -1905,6 +1907,7 @@ static int _regmap_bus_formatted_write(v
@@ -1907,6 +1909,7 @@ static int _regmap_bus_formatted_write(v
return ret;
}
@@ -53,7 +53,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
map->format.format_write(map, reg, val);
trace_regmap_hw_write_start(map, reg, 1);
@@ -2346,6 +2349,7 @@ static int _regmap_raw_multi_reg_write(s
@@ -2348,6 +2351,7 @@ static int _regmap_raw_multi_reg_write(s
unsigned int reg = regs[i].reg;
unsigned int val = regs[i].def;
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);
u8 += reg_bytes + pad_bytes;
map->format.format_val(u8, val, 0);
@@ -2673,6 +2677,7 @@ static int _regmap_raw_read(struct regma
@@ -2675,6 +2679,7 @@ static int _regmap_raw_read(struct regma
return ret;
}

View File

@@ -42,7 +42,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);
map->format.pad_bytes = config->pad_bits / 8;
map->format.reg_downshift = config->reg_downshift;
@@ -1736,6 +1738,7 @@ static int _regmap_raw_write_impl(struct
@@ -1738,6 +1740,7 @@ static int _regmap_raw_write_impl(struct
return ret;
}
@@ -50,7 +50,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
reg >>= map->format.reg_downshift;
map->format.format_reg(map->work_buf, reg, map->reg_shift);
regmap_set_work_buf_flag_mask(map, map->format.reg_bytes,
@@ -1907,6 +1910,7 @@ static int _regmap_bus_formatted_write(v
@@ -1909,6 +1912,7 @@ static int _regmap_bus_formatted_write(v
return ret;
}
@@ -58,7 +58,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
reg >>= map->format.reg_downshift;
map->format.format_write(map, reg, val);
@@ -2349,6 +2353,7 @@ static int _regmap_raw_multi_reg_write(s
@@ -2351,6 +2355,7 @@ static int _regmap_raw_multi_reg_write(s
unsigned int reg = regs[i].reg;
unsigned int val = regs[i].def;
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;
map->format.format_reg(u8, reg, map->reg_shift);
u8 += reg_bytes + pad_bytes;
@@ -2677,6 +2682,7 @@ static int _regmap_raw_read(struct regma
@@ -2679,6 +2684,7 @@ static int _regmap_raw_read(struct regma
return ret;
}

View File

@@ -28,7 +28,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1929,6 +1929,8 @@ static int _regmap_bus_reg_write(void *c
@@ -1931,6 +1931,8 @@ static int _regmap_bus_reg_write(void *c
{
struct regmap *map = context;
@@ -37,7 +37,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
return map->bus->reg_write(map->bus_context, reg, val);
}
@@ -2703,6 +2705,8 @@ static int _regmap_bus_reg_read(void *co
@@ -2705,6 +2707,8 @@ static int _regmap_bus_reg_read(void *co
{
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);
}
@@ -3078,6 +3082,8 @@ static int _regmap_update_bits(struct re
@@ -3080,6 +3084,8 @@ static int _regmap_update_bits(struct re
*change = false;
if (regmap_volatile(map, reg) && map->reg_update_bits) {

View File

@@ -61,7 +61,7 @@ Date: Tue Mar 1 23:55:47 2022 -0800
struct page *page_pool_alloc_pages(struct page_pool *pool, gfp_t gfp);
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -434,6 +434,19 @@ config NET_DEVLINK
@@ -432,6 +432,19 @@ config NET_DEVLINK
config PAGE_POOL
bool

View File

@@ -19,7 +19,7 @@ Date: Fri Mar 11 10:14:18 2022 +0100
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -501,7 +501,7 @@ static int veth_xdp_xmit(struct net_devi
@@ -503,7 +503,7 @@ static int veth_xdp_xmit(struct net_devi
struct xdp_frame *frame = frames[i];
void *ptr = veth_xdp_to_ptr(frame);
@@ -28,7 +28,7 @@ Date: Fri Mar 11 10:14:18 2022 +0100
__ptr_ring_produce(&rq->xdp_ring, ptr)))
break;
nxmit++;
@@ -862,7 +862,7 @@ static int veth_xdp_rcv(struct veth_rq *
@@ -864,7 +864,7 @@ static int veth_xdp_rcv(struct veth_rq *
/* ndo_xdp_xmit */
struct xdp_frame *frame = veth_ptr_to_xdp(ptr);

View File

@@ -15,7 +15,7 @@ Date: Fri Mar 11 10:14:20 2022 +0100
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1471,9 +1471,14 @@ static int veth_xdp_set(struct net_devic
@@ -1473,9 +1473,14 @@ static int veth_xdp_set(struct net_devic
goto err;
}

View File

@@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_size * sizeof(*ring->dma),
ring->dma,
ring->phys);
@@ -2162,7 +2163,7 @@ static void mtk_dma_free(struct mtk_eth
@@ -2165,7 +2166,7 @@ static void mtk_dma_free(struct mtk_eth
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
@@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring,
eth->phy_scratch_ring);
@@ -2514,6 +2515,8 @@ static void mtk_dim_tx(struct work_struc
@@ -2517,6 +2518,8 @@ static void mtk_dim_tx(struct work_struc
static int mtk_hw_init(struct mtk_eth *eth)
{
@@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state))
@@ -2526,6 +2529,10 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2529,6 +2532,10 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret)
goto err_disable_pm;
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
@@ -3079,6 +3086,35 @@ free_netdev:
@@ -3075,6 +3082,35 @@ free_netdev:
return err;
}
@@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_probe(struct platform_device *pdev)
{
struct device_node *mac_np;
@@ -3092,6 +3128,7 @@ static int mtk_probe(struct platform_dev
@@ -3088,6 +3124,7 @@ static int mtk_probe(struct platform_dev
eth->soc = of_device_get_match_data(&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);
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
@@ -3140,6 +3177,16 @@ static int mtk_probe(struct platform_dev
@@ -3136,6 +3173,16 @@ static int mtk_probe(struct platform_dev
}
}

View File

@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_msg_level = -1;
module_param_named(msg_level, mtk_msg_level, int, 0);
@@ -3209,6 +3210,22 @@ static int mtk_probe(struct platform_dev
@@ -3205,6 +3206,22 @@ static int mtk_probe(struct platform_dev
}
}

View File

@@ -233,7 +233,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static inline void
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -872,6 +872,7 @@ enum net_device_path_type {
@@ -875,6 +875,7 @@ enum net_device_path_type {
DEV_PATH_BRIDGE,
DEV_PATH_PPPOE,
DEV_PATH_DSA,
@@ -241,7 +241,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
};
struct net_device_path {
@@ -897,6 +898,12 @@ struct net_device_path {
@@ -900,6 +901,12 @@ struct net_device_path {
int port;
u16 proto;
} dsa;
@@ -256,7 +256,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -763,6 +763,10 @@ int dev_fill_forward_path(const struct n
@@ -769,6 +769,10 @@ int dev_fill_forward_path(const struct n
if (WARN_ON_ONCE(last_dev == ctx.dev))
return -1;
}

View File

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2335,7 +2335,7 @@ static int mtk_open(struct net_device *d
@@ -2338,7 +2338,7 @@ static int mtk_open(struct net_device *d
return err;
}
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
gdm_config = MTK_GDMA_TO_PPE;
mtk_gdm_config(eth, gdm_config);
@@ -2409,7 +2409,7 @@ static int mtk_stop(struct net_device *d
@@ -2412,7 +2412,7 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
if (eth->soc->offload_version)
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
}
@@ -3301,10 +3301,11 @@ static int mtk_probe(struct platform_dev
@@ -3297,10 +3297,11 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {

View File

@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
@@ -3301,7 +3307,7 @@ static int mtk_probe(struct platform_dev
@@ -3297,7 +3303,7 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {

View File

@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mediatek,hifsys = <&hifsys>;
--- a/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
@@ -3184,7 +3184,7 @@ static int mtk_probe(struct platform_dev
struct regmap *cci;
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,

View File

@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mtk_w32(eth, eth->phy_scratch_ring, MTK_QDMA_FQ_HEAD);
@@ -2170,6 +2173,7 @@ static int mtk_dma_init(struct mtk_eth *
@@ -2173,6 +2176,7 @@ static int mtk_dma_init(struct mtk_eth *
static void mtk_dma_free(struct mtk_eth *eth)
{
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i;
for (i = 0; i < MTK_MAC_COUNT; i++)
@@ -2177,9 +2181,8 @@ static void mtk_dma_free(struct mtk_eth
@@ -2180,9 +2184,8 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev,
@@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0;
}
@@ -3391,6 +3394,9 @@ static const struct mtk_soc_data mt2701_
@@ -3387,6 +3390,9 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,
@@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7621_data = {
@@ -3399,6 +3405,9 @@ static const struct mtk_soc_data mt7621_
@@ -3395,6 +3401,9 @@ static const struct mtk_soc_data mt7621_
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7622_data = {
@@ -3408,6 +3417,9 @@ static const struct mtk_soc_data mt7622_
@@ -3404,6 +3413,9 @@ static const struct mtk_soc_data mt7622_
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7623_data = {
@@ -3416,6 +3428,9 @@ static const struct mtk_soc_data mt7623_
@@ -3412,6 +3424,9 @@ static const struct mtk_soc_data mt7623_
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,
.offload_version = 2,
@@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7629_data = {
@@ -3424,6 +3439,9 @@ static const struct mtk_soc_data mt7629_
@@ -3420,6 +3435,9 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false,
@@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data rt5350_data = {
@@ -3431,6 +3449,9 @@ static const struct mtk_soc_data rt5350_
@@ -3427,6 +3445,9 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false,

View File

@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->dma = NULL;
}
}
@@ -3406,6 +3405,7 @@ static const struct mtk_soc_data mt2701_
@@ -3402,6 +3401,7 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true,
.txrx = {
.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_
@@ -3413,6 +3413,7 @@ static const struct mtk_soc_data mt7621_
.offload_version = 2,
.txrx = {
.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_
@@ -3425,6 +3426,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2,
.txrx = {
.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_
@@ -3436,6 +3438,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 2,
.txrx = {
.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_
@@ -3447,6 +3450,7 @@ static const struct mtk_soc_data mt7629_
.required_pctl = false,
.txrx = {
.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_
@@ -3457,6 +3461,7 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),

View File

@@ -345,7 +345,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2126,9 +2185,9 @@ static int mtk_dma_busy_wait(struct mtk_
@@ -2129,9 +2188,9 @@ static int mtk_dma_busy_wait(struct mtk_
u32 val;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
@@ -357,7 +357,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = readx_poll_timeout_atomic(__raw_readl, eth->base + reg, val,
!(val & (MTK_RX_DMA_BUSY | MTK_TX_DMA_BUSY)),
@@ -2186,8 +2245,8 @@ static int mtk_dma_init(struct mtk_eth *
@@ -2189,8 +2248,8 @@ static int mtk_dma_init(struct mtk_eth *
* automatically
*/
mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN |
@@ -368,7 +368,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2261,13 +2320,14 @@ static irqreturn_t mtk_handle_irq_tx(int
@@ -2264,13 +2323,14 @@ static irqreturn_t mtk_handle_irq_tx(int
static irqreturn_t mtk_handle_irq(int irq, void *_eth)
{
struct mtk_eth *eth = _eth;
@@ -387,7 +387,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_handle_irq_tx(irq, _eth);
}
@@ -2291,6 +2351,7 @@ static void mtk_poll_controller(struct n
@@ -2294,6 +2354,7 @@ static void mtk_poll_controller(struct n
static int mtk_start_dma(struct mtk_eth *eth)
{
u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0;
@@ -395,7 +395,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err;
err = mtk_dma_init(eth);
@@ -2305,16 +2366,15 @@ static int mtk_start_dma(struct mtk_eth
@@ -2308,16 +2369,15 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
MTK_RX_BT_32DWORDS,
@@ -415,7 +415,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
@@ -2440,8 +2500,8 @@ static int mtk_stop(struct net_device *d
@@ -2443,8 +2503,8 @@ static int mtk_stop(struct net_device *d
cancel_work_sync(&eth->tx_dim.work);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
@@ -426,7 +426,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_dma_free(eth);
@@ -2495,6 +2555,7 @@ static void mtk_dim_rx(struct work_struc
@@ -2498,6 +2558,7 @@ static void mtk_dim_rx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim);
@@ -434,7 +434,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct dim_cq_moder cur_profile;
u32 val, cur;
@@ -2502,7 +2563,7 @@ static void mtk_dim_rx(struct work_struc
@@ -2505,7 +2566,7 @@ static void mtk_dim_rx(struct work_struc
dim->profile_ix);
spin_lock_bh(&eth->dim_lock);
@@ -443,7 +443,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val &= MTK_PDMA_DELAY_TX_MASK;
val |= MTK_PDMA_DELAY_RX_EN;
@@ -2512,9 +2573,9 @@ static void mtk_dim_rx(struct work_struc
@@ -2515,9 +2576,9 @@ static void mtk_dim_rx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT;
@@ -455,7 +455,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_unlock_bh(&eth->dim_lock);
@@ -2525,6 +2586,7 @@ static void mtk_dim_tx(struct work_struc
@@ -2528,6 +2589,7 @@ static void mtk_dim_tx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim);
@@ -463,7 +463,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct dim_cq_moder cur_profile;
u32 val, cur;
@@ -2532,7 +2594,7 @@ static void mtk_dim_tx(struct work_struc
@@ -2535,7 +2597,7 @@ static void mtk_dim_tx(struct work_struc
dim->profile_ix);
spin_lock_bh(&eth->dim_lock);
@@ -472,7 +472,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val &= MTK_PDMA_DELAY_RX_MASK;
val |= MTK_PDMA_DELAY_TX_EN;
@@ -2542,9 +2604,9 @@ static void mtk_dim_tx(struct work_struc
@@ -2545,9 +2607,9 @@ static void mtk_dim_tx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT;
@@ -484,7 +484,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_unlock_bh(&eth->dim_lock);
@@ -2555,6 +2617,7 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2558,6 +2620,7 @@ static int mtk_hw_init(struct mtk_eth *e
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE;
@@ -492,7 +492,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state))
@@ -2629,10 +2692,10 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2632,10 +2695,10 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_rx_irq_disable(eth, ~0);
/* FE int grouping */
@@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
return 0;
@@ -3171,14 +3234,6 @@ static int mtk_probe(struct platform_dev
@@ -3167,14 +3230,6 @@ static int mtk_probe(struct platform_dev
if (IS_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)) {
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth->ip_align = NET_IP_ALIGN;
@@ -3412,6 +3467,7 @@ static int mtk_remove(struct platform_de
@@ -3408,6 +3463,7 @@ static int mtk_remove(struct platform_de
}
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,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
@@ -3423,6 +3479,7 @@ static const struct mtk_soc_data mt2701_
@@ -3419,6 +3475,7 @@ static const struct mtk_soc_data mt2701_
};
static const struct mtk_soc_data mt7621_data = {
@@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7621_CAPS,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
@@ -3435,6 +3492,7 @@ static const struct mtk_soc_data mt7621_
@@ -3431,6 +3488,7 @@ static const struct mtk_soc_data mt7621_
};
static const struct mtk_soc_data mt7622_data = {
@@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x2028,
.caps = MT7622_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
@@ -3448,6 +3506,7 @@ static const struct mtk_soc_data mt7622_
@@ -3444,6 +3502,7 @@ static const struct mtk_soc_data mt7622_
};
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,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
@@ -3460,6 +3519,7 @@ static const struct mtk_soc_data mt7623_
@@ -3456,6 +3515,7 @@ static const struct mtk_soc_data mt7623_
};
static const struct mtk_soc_data mt7629_data = {
@@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x128,
.caps = MT7629_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
@@ -3472,6 +3532,7 @@ static const struct mtk_soc_data mt7629_
@@ -3468,6 +3528,7 @@ static const struct mtk_soc_data mt7629_
};
static const struct mtk_soc_data rt5350_data = {

View File

@@ -403,7 +403,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
@@ -2298,7 +2406,7 @@ static irqreturn_t mtk_handle_irq_rx(int
@@ -2301,7 +2409,7 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++;
if (likely(napi_schedule_prep(&eth->rx_napi))) {
__napi_schedule(&eth->rx_napi);
@@ -412,7 +412,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return IRQ_HANDLED;
@@ -2322,8 +2430,10 @@ static irqreturn_t mtk_handle_irq(int ir
@@ -2325,8 +2433,10 @@ static irqreturn_t mtk_handle_irq(int ir
struct mtk_eth *eth = _eth;
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
@@ -425,7 +425,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_handle_irq_rx(irq, _eth);
}
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
@@ -2341,16 +2451,16 @@ static void mtk_poll_controller(struct n
@@ -2344,16 +2454,16 @@ static void mtk_poll_controller(struct n
struct mtk_eth *eth = mac->hw;
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -445,7 +445,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int err;
@@ -2361,12 +2471,19 @@ static int mtk_start_dma(struct mtk_eth
@@ -2364,12 +2474,19 @@ static int mtk_start_dma(struct mtk_eth
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
@@ -471,7 +471,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth,
MTK_RX_DMA_EN | rx_2b_offset |
MTK_RX_BT_32DWORDS | MTK_MULTI_EN,
@@ -2440,7 +2557,7 @@ static int mtk_open(struct net_device *d
@@ -2443,7 +2560,7 @@ static int mtk_open(struct net_device *d
napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@@ -480,7 +480,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
refcount_set(&eth->dma_refcnt, 1);
}
else
@@ -2492,7 +2609,7 @@ static int mtk_stop(struct net_device *d
@@ -2495,7 +2612,7 @@ static int mtk_stop(struct net_device *d
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_disable(&eth->tx_napi);
napi_disable(&eth->rx_napi);
@@ -2652,9 +2769,25 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2655,9 +2772,25 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
}
@@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (eth->pctl) {
/* Set GE2 driving and slew rate */
@@ -2693,11 +2826,47 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -2696,11 +2829,47 @@ static int mtk_hw_init(struct mtk_eth *e
/* FE int grouping */
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
@@ -568,7 +568,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
err_disable_pm:
@@ -3234,12 +3403,8 @@ static int mtk_probe(struct platform_dev
@@ -3230,12 +3399,8 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
@@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock);
@@ -3475,6 +3640,10 @@ static const struct mtk_soc_data mt2701_
@@ -3471,6 +3636,10 @@ static const struct mtk_soc_data mt2701_
.txrx = {
.txd_size = sizeof(struct mtk_tx_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_
@@ -3484,6 +3653,10 @@ static const struct mtk_soc_data mt7621_
.txrx = {
.txd_size = sizeof(struct mtk_tx_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_
@@ -3498,6 +3671,10 @@ static const struct mtk_soc_data mt7622_
.txrx = {
.txd_size = sizeof(struct mtk_tx_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_
@@ -3511,6 +3688,10 @@ static const struct mtk_soc_data mt7623_
.txrx = {
.txd_size = sizeof(struct mtk_tx_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_
@@ -3524,6 +3705,10 @@ static const struct mtk_soc_data mt7629_
.txrx = {
.txd_size = sizeof(struct mtk_tx_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_
@@ -3536,6 +3721,10 @@ static const struct mtk_soc_data rt5350_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),

View File

@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
@@ -3712,6 +3749,21 @@ static const struct mtk_soc_data mt7629_
@@ -3708,6 +3745,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 = {
.reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS,
@@ -3734,6 +3786,7 @@ const struct of_device_id of_mtk_match[]
@@ -3730,6 +3782,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
skb->ip_summed = CHECKSUM_UNNECESSARY;
else
skb_checksum_none_assert(skb);
@@ -3759,6 +3765,7 @@ static const struct mtk_soc_data mt7986_
@@ -3755,6 +3761,7 @@ static const struct mtk_soc_data mt7986_
.txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2),
.rx_irq_done_mask = MTK_RX_DONE_INT_V2,

View File

@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -686,7 +686,7 @@ static void bcm_sf2_sw_validate(struct d
@@ -692,7 +692,7 @@ static void bcm_sf2_sw_validate(struct d
state->interface != PHY_INTERFACE_MODE_GMII &&
state->interface != PHY_INTERFACE_MODE_INTERNAL &&
state->interface != PHY_INTERFACE_MODE_MOCA) {
@@ -313,7 +313,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (port != core_readl(priv, CORE_IMP0_PRT_ID))
dev_err(ds->dev,
"Unsupported interface: %d for port %d\n",
@@ -714,10 +714,8 @@ static void bcm_sf2_sw_validate(struct d
@@ -720,10 +720,8 @@ static void bcm_sf2_sw_validate(struct d
phylink_set(mask, 100baseT_Half);
phylink_set(mask, 100baseT_Full);
@@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void xrs700x_mac_link_up(struct dsa_switch *ds, int port,
--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
@@ -369,9 +369,8 @@ static int xgbe_set_link_ksettings(struc
@@ -374,9 +374,8 @@ static int xgbe_set_link_ksettings(struc
__ETHTOOL_LINK_MODE_MASK_NBITS, cmd->link_modes.advertising,
__ETHTOOL_LINK_MODE_MASK_NBITS, lks->link_modes.supported);
@@ -566,7 +566,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if ((cmd->base.autoneg == AUTONEG_ENABLE) &&
bitmap_empty(advertising, __ETHTOOL_LINK_MODE_MASK_NBITS)) {
@@ -384,8 +383,7 @@ static int xgbe_set_link_ksettings(struc
@@ -389,8 +388,7 @@ static int xgbe_set_link_ksettings(struc
pdata->phy.autoneg = cmd->base.autoneg;
pdata->phy.speed = speed;
pdata->phy.duplex = cmd->base.duplex;
@@ -726,7 +726,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* to advertise both, only report advertising at 2500BaseX.
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -6347,15 +6347,14 @@ static void mvpp2_phylink_validate(struc
@@ -6352,15 +6352,14 @@ static void mvpp2_phylink_validate(struc
goto empty_set;
}
@@ -747,7 +747,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mvpp2_xlg_config(struct mvpp2_port *port, unsigned int mode,
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
@@ -1168,9 +1168,8 @@ static int otx2_set_link_ksettings(struc
@@ -1172,9 +1172,8 @@ static int otx2_set_link_ksettings(struc
otx2_get_link_ksettings(netdev, &cur_ks);
/* Check requested modes against supported modes by hardware */

View File

@@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
pl = kzalloc(sizeof(*pl), GFP_KERNEL);
if (!pl)
return ERR_PTR(-ENOMEM);
@@ -946,9 +987,10 @@ EXPORT_SYMBOL_GPL(phylink_create);
@@ -947,9 +988,10 @@ EXPORT_SYMBOL_GPL(phylink_create);
* @pl: a pointer to a &struct phylink returned from phylink_create()
* @pcs: a pointer to the &struct phylink_pcs
*
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
*
* Please note that there are behavioural changes with the mac_config()
* callback if a PCS is present (denoting a newer setup) so removing a PCS
@@ -959,6 +1001,14 @@ void phylink_set_pcs(struct phylink *pl,
@@ -960,6 +1002,14 @@ void phylink_set_pcs(struct phylink *pl,
{
pl->pcs = pcs;
pl->pcs_ops = pcs->ops;

View File

@@ -66,7 +66,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
phy_interface_empty(config->supported_interfaces)) {
dev_err(config->dev,
"phylink: error: empty supported_interfaces but mac_select_pcs() method present\n");
@@ -1220,6 +1227,7 @@ struct phylink *phylink_create(struct ph
@@ -1221,6 +1228,7 @@ struct phylink *phylink_create(struct ph
return ERR_PTR(-EINVAL);
}

View File

@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/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
@@ -3351,6 +3351,26 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV;

View File

@@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.mac_pcs_get_state = mtk_mac_pcs_get_state,
.mac_an_restart = mtk_mac_an_restart,
.mac_config = mtk_mac_config,
@@ -3317,6 +3269,9 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -3313,6 +3265,9 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV;

View File

@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/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
@@ -3265,6 +3265,10 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV;

View File

@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/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
@@ -3564,9 +3564,9 @@ static int mtk_probe(struct platform_dev
*/
init_dummy_netdev(&eth->dummy_dev);
netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx,

View File

@@ -15,7 +15,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/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
@@ -3260,7 +3260,6 @@ static int mtk_add_mac(struct mtk_eth *e
/* mac config is not set */
mac->interface = PHY_INTERFACE_MODE_NA;

View File

@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
MAC_MCR_FORCE_RX_FC);
@@ -3268,9 +3278,7 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -3264,9 +3274,7 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV;

View File

@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1190,27 +1190,31 @@ static int
@@ -1198,27 +1198,31 @@ static int
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
struct net_device *bridge)
{
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
/* Add the all other ports to this port matrix. */
@@ -1315,24 +1319,28 @@ static void
@@ -1323,24 +1327,28 @@ static void
mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
struct net_device *bridge)
{

View File

@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2444,6 +2444,32 @@ mt7531_setup(struct dsa_switch *ds)
@@ -2454,6 +2454,32 @@ mt7531_setup(struct dsa_switch *ds)
return 0;
}
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static bool
mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
const struct phylink_link_state *state)
@@ -2480,6 +2506,37 @@ static bool mt7531_is_rgmii_port(struct
@@ -2490,6 +2516,37 @@ static bool mt7531_is_rgmii_port(struct
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
}
@@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static bool
mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
const struct phylink_link_state *state)
@@ -2956,6 +3013,18 @@ mt7531_cpu_port_config(struct dsa_switch
@@ -2966,6 +3023,18 @@ mt7531_cpu_port_config(struct dsa_switch
return 0;
}
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static void
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
unsigned long *supported)
@@ -3191,6 +3260,7 @@ static const struct dsa_switch_ops mt753
@@ -3201,6 +3270,7 @@ static const struct dsa_switch_ops mt753
.port_vlan_del = mt7530_port_vlan_del,
.port_mirror_add = mt753x_port_mirror_add,
.port_mirror_del = mt753x_port_mirror_del,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.phylink_validate = mt753x_phylink_validate,
.phylink_mac_link_state = mt753x_phylink_mac_link_state,
.phylink_mac_config = mt753x_phylink_mac_config,
@@ -3208,6 +3278,7 @@ static const struct mt753x_info mt753x_t
@@ -3218,6 +3288,7 @@ static const struct mt753x_info mt753x_t
.phy_read = mt7530_phy_read,
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
@@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.phy_mode_supported = mt7530_phy_mode_supported,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
@@ -3219,6 +3290,7 @@ static const struct mt753x_info mt753x_t
@@ -3229,6 +3300,7 @@ static const struct mt753x_info mt753x_t
.phy_read = mt7530_phy_read,
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
@@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.phy_mode_supported = mt7530_phy_mode_supported,
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
@@ -3231,6 +3303,7 @@ static const struct mt753x_info mt753x_t
@@ -3241,6 +3313,7 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7531_ind_phy_write,
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.phy_mode_supported = mt7531_phy_mode_supported,
.mac_port_validate = mt7531_mac_port_validate,
.mac_port_get_state = mt7531_phylink_mac_link_state,
@@ -3293,6 +3366,7 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3303,6 +3376,7 @@ mt7530_probe(struct mdio_device *mdiodev
*/
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||

View File

@@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2470,37 +2470,6 @@ static void mt7530_mac_port_get_caps(str
@@ -2480,37 +2480,6 @@ static void mt7530_mac_port_get_caps(str
}
}
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
{
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
@@ -2537,44 +2506,6 @@ static void mt7531_mac_port_get_caps(str
@@ -2547,44 +2516,6 @@ static void mt7531_mac_port_get_caps(str
}
}
@@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{
@@ -2829,9 +2760,6 @@ mt753x_phylink_mac_config(struct dsa_swi
@@ -2839,9 +2770,6 @@ mt753x_phylink_mac_config(struct dsa_swi
struct mt7530_priv *priv = ds->priv;
u32 mcr_cur, mcr_new;
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
switch (port) {
case 0 ... 4: /* Internal phy */
if (state->interface != PHY_INTERFACE_MODE_GMII)
@@ -3047,12 +2975,6 @@ mt753x_phylink_validate(struct dsa_switc
@@ -3057,12 +2985,6 @@ mt753x_phylink_validate(struct dsa_switc
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
struct mt7530_priv *priv = ds->priv;
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
phylink_set_port_modes(mask);
if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
@@ -3279,7 +3201,6 @@ static const struct mt753x_info mt753x_t
@@ -3289,7 +3211,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
@@ -3291,7 +3212,6 @@ static const struct mt753x_info mt753x_t
@@ -3301,7 +3222,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_validate = mt7530_mac_port_validate,
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
@@ -3304,7 +3224,6 @@ static const struct mt753x_info mt753x_t
@@ -3314,7 +3234,6 @@ static const struct mt753x_info mt753x_t
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_validate = mt7531_mac_port_validate,
.mac_port_get_state = mt7531_phylink_mac_link_state,
.mac_port_config = mt7531_mac_config,
@@ -3367,7 +3286,6 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3377,7 +3296,6 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||

View File

@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2999,11 +2999,6 @@ mt753x_phylink_validate(struct dsa_switc
@@ -3009,11 +3009,6 @@ mt753x_phylink_validate(struct dsa_switc
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);

View File

@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2577,12 +2577,13 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2587,12 +2587,13 @@ static int mt7531_rgmii_setup(struct mt7
}
static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
phylink_set(supported, 2500baseX_Full);
phylink_set(supported, 2500baseT_Full);
}
@@ -2955,16 +2956,18 @@ static void mt753x_phylink_get_caps(stru
@@ -2965,16 +2966,18 @@ static void mt753x_phylink_get_caps(stru
static void
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
@@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
static void
@@ -2987,12 +2990,13 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2997,12 +3000,13 @@ mt753x_phylink_validate(struct dsa_switc
}
/* This switch only supports 1G full-duplex. */

View File

@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2576,19 +2576,6 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2586,19 +2586,6 @@ static int mt7531_rgmii_setup(struct mt7
return 0;
}
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static void
mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
unsigned int mode, phy_interface_t interface,
@@ -2955,51 +2942,21 @@ static void mt753x_phylink_get_caps(stru
@@ -2965,51 +2952,21 @@ static void mt753x_phylink_get_caps(stru
}
static void
@@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);
@@ -3200,7 +3157,6 @@ static const struct mt753x_info mt753x_t
@@ -3210,7 +3167,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
},
@@ -3211,7 +3167,6 @@ static const struct mt753x_info mt753x_t
@@ -3221,7 +3177,6 @@ static const struct mt753x_info mt753x_t
.phy_write = mt7530_phy_write,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_get_state = mt7530_phylink_mac_link_state,
.mac_port_config = mt7530_mac_config,
},
@@ -3223,7 +3178,6 @@ static const struct mt753x_info mt753x_t
@@ -3233,7 +3188,6 @@ static const struct mt753x_info mt753x_t
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config,
.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_port_get_state = mt7531_phylink_mac_link_state,
.mac_port_config = mt7531_mac_config,
.mac_pcs_an_restart = mt7531_sgmii_restart_an,
@@ -3285,7 +3239,6 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3295,7 +3249,6 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||

View File

@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* String, offset, and register size in bytes if different from 4 bytes */
static const struct mt7530_mib_desc mt7530_mib[] = {
MIB_DESC(1, 0x00, "TxDrop"),
@@ -2576,12 +2581,11 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2586,12 +2591,11 @@ static int mt7531_rgmii_setup(struct mt7
return 0;
}
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
unsigned int val;
/* For adjusting speed and duplex of SGMII force mode. */
@@ -2607,6 +2611,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
@@ -2617,6 +2621,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
/* MT7531 SGMII 1G force mode can only work in full duplex mode,
* no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
*/
if ((speed == SPEED_10 || speed == SPEED_100) &&
duplex != DUPLEX_FULL)
@@ -2682,9 +2689,10 @@ static int mt7531_sgmii_setup_mode_an(st
@@ -2692,9 +2699,10 @@ static int mt7531_sgmii_setup_mode_an(st
return 0;
}
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
u32 val;
/* Only restart AN when AN is enabled */
@@ -2741,6 +2749,24 @@ mt753x_mac_config(struct dsa_switch *ds,
@@ -2751,6 +2759,24 @@ mt753x_mac_config(struct dsa_switch *ds,
return priv->info->mac_port_config(ds, port, mode, state->interface);
}
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static void
mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
const struct phylink_link_state *state)
@@ -2802,17 +2828,6 @@ unsupported:
@@ -2812,17 +2838,6 @@ unsupported:
mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
}
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
unsigned int mode,
phy_interface_t interface)
@@ -2822,16 +2837,13 @@ static void mt753x_phylink_mac_link_down
@@ -2832,16 +2847,13 @@ static void mt753x_phylink_mac_link_down
mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
}
@@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
@@ -2844,8 +2856,6 @@ static void mt753x_phylink_mac_link_up(s
@@ -2854,8 +2866,6 @@ static void mt753x_phylink_mac_link_up(s
struct mt7530_priv *priv = ds->priv;
u32 mcr;
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
/* MT753x MAC works in 1G full duplex mode for all up-clocked
@@ -2923,6 +2933,8 @@ mt7531_cpu_port_config(struct dsa_switch
@@ -2933,6 +2943,8 @@ mt7531_cpu_port_config(struct dsa_switch
return ret;
mt7530_write(priv, MT7530_PMCR_P(port),
PMCR_CPU_PORT_SETTING(priv->id));
@@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
speed, DUPLEX_FULL, true, true);
@@ -2962,16 +2974,13 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2972,16 +2984,13 @@ mt753x_phylink_validate(struct dsa_switc
linkmode_and(state->advertising, state->advertising, mask);
}
@@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
state->link = (pmsr & PMSR_LINK);
@@ -2998,8 +3007,6 @@ mt7530_phylink_mac_link_state(struct dsa
@@ -3008,8 +3017,6 @@ mt7530_phylink_mac_link_state(struct dsa
state->pause |= MLO_PAUSE_RX;
if (pmsr & PMSR_TX_FC)
state->pause |= MLO_PAUSE_TX;
@@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
static int
@@ -3041,32 +3048,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
@@ -3051,32 +3058,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
return 0;
}
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (ret)
return ret;
@@ -3079,6 +3103,13 @@ mt753x_setup(struct dsa_switch *ds)
@@ -3089,6 +3113,13 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);
@@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return ret;
}
@@ -3140,9 +3171,8 @@ static const struct dsa_switch_ops mt753
@@ -3150,9 +3181,8 @@ static const struct dsa_switch_ops mt753
.port_mirror_del = mt753x_port_mirror_del,
.phylink_get_caps = mt753x_phylink_get_caps,
.phylink_validate = mt753x_phylink_validate,
@@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
.phylink_mac_link_up = mt753x_phylink_mac_link_up,
.get_mac_eee = mt753x_get_mac_eee,
@@ -3152,36 +3182,34 @@ static const struct dsa_switch_ops mt753
@@ -3162,36 +3192,34 @@ static const struct dsa_switch_ops mt753
static const struct mt753x_info mt753x_table[] = {
[ID_MT7621] = {
.id = ID_MT7621,
@@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
},
};
@@ -3239,7 +3267,7 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3249,7 +3277,7 @@ mt7530_probe(struct mdio_device *mdiodev
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||
!priv->info->mac_port_get_caps ||

View File

@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2953,25 +2953,16 @@ static void mt753x_phylink_get_caps(stru
@@ -2963,25 +2963,16 @@ static void mt753x_phylink_get_caps(stru
priv->info->mac_port_get_caps(ds, port, config);
}
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}
static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
@@ -3073,12 +3064,14 @@ static void mt7530_pcs_an_restart(struct
@@ -3083,12 +3074,14 @@ static void mt7530_pcs_an_restart(struct
}
static const struct phylink_pcs_ops mt7530_pcs_ops = {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.pcs_get_state = mt7531_pcs_get_state,
.pcs_config = mt753x_pcs_config,
.pcs_an_restart = mt7531_pcs_an_restart,
@@ -3170,7 +3163,6 @@ static const struct dsa_switch_ops mt753
@@ -3180,7 +3173,6 @@ static const struct dsa_switch_ops mt753
.port_mirror_add = mt753x_port_mirror_add,
.port_mirror_del = mt753x_port_mirror_del,
.phylink_get_caps = mt753x_phylink_get_caps,

View File

@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2950,6 +2950,12 @@ static void mt753x_phylink_get_caps(stru
@@ -2960,6 +2960,12 @@ static void mt753x_phylink_get_caps(stru
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000FD;

View File

@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -3088,9 +3088,16 @@ static int
@@ -3098,9 +3098,16 @@ static int
mt753x_setup(struct dsa_switch *ds)
{
struct mt7530_priv *priv = ds->priv;
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret)
return ret;
@@ -3102,13 +3109,6 @@ mt753x_setup(struct dsa_switch *ds)
@@ -3112,13 +3119,6 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);

View File

@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1536,11 +1536,11 @@ static void
@@ -1544,11 +1544,11 @@ static void
mt7530_hw_vlan_add(struct mt7530_priv *priv,
struct mt7530_hw_vlan_entry *entry)
{
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Validate the entry with independent learning, create egress tag per
* VLAN and joining the port as one of the port members.
@@ -1551,22 +1551,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
@@ -1559,22 +1559,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
/* Decide whether adding tag or not for those outgoing packets from the
* port inside the VLAN.
@@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static void
@@ -1585,11 +1583,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
@@ -1593,11 +1591,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
return;
}

View File

@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1040,6 +1040,7 @@ static int
@@ -1048,6 +1048,7 @@ static int
mt7530_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
{
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
@@ -1048,7 +1049,11 @@ mt7530_port_enable(struct dsa_switch *ds
@@ -1056,7 +1057,11 @@ mt7530_port_enable(struct dsa_switch *ds
* restore the port matrix if the port is the member of a certain
* bridge.
*/
@@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
priv->ports[port].enable = true;
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
priv->ports[port].pm);
@@ -1196,7 +1201,8 @@ mt7530_port_bridge_join(struct dsa_switc
@@ -1204,7 +1209,8 @@ mt7530_port_bridge_join(struct dsa_switc
struct net_device *bridge)
{
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
@@ -1273,9 +1279,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
@@ -1281,9 +1287,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
* the CPU port get out of VLAN filtering mode.
*/
if (all_user_ports_removed) {
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
}
}
@@ -1325,6 +1334,7 @@ mt7530_port_bridge_leave(struct dsa_swit
@@ -1333,6 +1342,7 @@ mt7530_port_bridge_leave(struct dsa_swit
struct net_device *bridge)
{
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
@@ -1353,8 +1363,8 @@ mt7530_port_bridge_leave(struct dsa_swit
@@ -1361,8 +1371,8 @@ mt7530_port_bridge_leave(struct dsa_swit
*/
if (priv->ports[port].enable)
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* When a port is removed from the bridge, the port would be set up
* back to the default as is at initial boot which is a VLAN-unaware
@@ -1517,6 +1527,9 @@ static int
@@ -1525,6 +1535,9 @@ static int
mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
struct netlink_ext_ack *extack)
{
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (vlan_filtering) {
/* The port is being kept as VLAN-unaware port when bridge is
* set up with vlan_filtering not being set, Otherwise, the
@@ -1524,7 +1537,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
@@ -1532,7 +1545,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
* for becoming a VLAN-aware port.
*/
mt7530_port_set_vlan_aware(ds, port);

View File

@@ -208,7 +208,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct page_pool *pp;
pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no,
@@ -2710,6 +2785,48 @@ static int mtk_stop(struct net_device *d
@@ -2713,6 +2788,48 @@ static int mtk_stop(struct net_device *d
return 0;
}
@@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
{
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
@@ -3005,6 +3122,12 @@ static int mtk_change_mtu(struct net_dev
@@ -2991,6 +3108,12 @@ static int mtk_change_mtu(struct net_dev
struct mtk_eth *eth = mac->hw;
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)) {
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK;
@@ -3332,6 +3455,7 @@ static const struct net_device_ops mtk_n
@@ -3317,6 +3440,7 @@ static const struct net_device_ops mtk_n
.ndo_poll_controller = mtk_poll_controller,
#endif
.ndo_setup_tc = mtk_eth_setup_tc,

View File

@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mtk_tx_unmap(eth, tx_buf, true);
@@ -3478,6 +3627,7 @@ static const struct net_device_ops mtk_n
@@ -3463,6 +3612,7 @@ static const struct net_device_ops mtk_n
#endif
.ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp,

View File

@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MediaTek SoC family.
--- a/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
@@ -3474,11 +3474,18 @@ static void mtk_get_strings(struct net_d
int i;
switch (stringset) {
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break;
}
}
@@ -3500,13 +3507,35 @@ static void mtk_get_strings(struct net_d
@@ -3486,13 +3493,35 @@ static void mtk_get_strings(struct net_d
static int mtk_get_sset_count(struct net_device *dev, int 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,
struct ethtool_stats *stats, u64 *data)
{
@@ -3534,6 +3563,8 @@ static void mtk_get_ethtool_stats(struct
@@ -3520,6 +3549,8 @@ static void mtk_get_ethtool_stats(struct
for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
*data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);

View File

@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11790,6 +11790,14 @@ L: netdev@vger.kernel.org
@@ -11783,6 +11783,14 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/mediatek/

View File

@@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
};
/* strings used by ethtool */
@@ -2925,6 +2929,7 @@ static int mtk_open(struct net_device *d
@@ -2928,6 +2932,7 @@ static int mtk_open(struct net_device *d
/* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) {
@@ -65,7 +65,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
u32 gdm_config = MTK_GDMA_TO_PDMA;
int err;
@@ -2934,15 +2939,15 @@ static int mtk_open(struct net_device *d
@@ -2937,15 +2942,15 @@ static int mtk_open(struct net_device *d
return err;
}
@@ -84,7 +84,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
refcount_set(&eth->dma_refcnt, 1);
}
else
@@ -4048,7 +4053,9 @@ static int mtk_probe(struct platform_dev
@@ -4044,7 +4049,9 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {

View File

@@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/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_
@@ -4147,6 +4147,7 @@ static const struct mtk_soc_data mt7621_
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4169,6 +4170,7 @@ static const struct mtk_soc_data mt7622_
@@ -4165,6 +4166,7 @@ static const struct mtk_soc_data mt7622_
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4186,6 +4188,7 @@ static const struct mtk_soc_data mt7623_
@@ -4182,6 +4184,7 @@ static const struct mtk_soc_data mt7623_
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,
.offload_version = 2,
@@ -68,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4219,6 +4222,7 @@ static const struct mtk_soc_data mt7986_
@@ -4215,6 +4218,7 @@ static const struct mtk_soc_data mt7986_
.caps = MT7986_CAPS,
.required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false,

View File

@@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
@@ -2930,7 +2930,8 @@ static int mtk_open(struct net_device *d
@@ -2933,7 +2933,8 @@ static int mtk_open(struct net_device *d
/* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) {
const struct mtk_soc_data *soc = eth->soc;
@@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
int err;
err = mtk_start_dma(eth);
@@ -2939,8 +2940,11 @@ static int mtk_open(struct net_device *d
@@ -2942,8 +2943,11 @@ static int mtk_open(struct net_device *d
return err;
}
@@ -81,7 +81,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_gdm_config(eth, gdm_config);
@@ -2985,6 +2989,7 @@ static int mtk_stop(struct net_device *d
@@ -2988,6 +2992,7 @@ static int mtk_stop(struct net_device *d
{
struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw;
@@ -89,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
phylink_stop(mac->phylink);
@@ -3012,8 +3017,8 @@ static int mtk_stop(struct net_device *d
@@ -3015,8 +3020,8 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
@@ -100,7 +100,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
return 0;
}
@@ -4053,12 +4058,19 @@ static int mtk_probe(struct platform_dev
@@ -4049,12 +4054,19 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {

View File

@@ -39,7 +39,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
};
/* strings used by ethtool */
@@ -3970,16 +3978,12 @@ static int mtk_probe(struct platform_dev
@@ -3966,16 +3974,12 @@ static int mtk_probe(struct platform_dev
for (i = 0;; i++) {
struct device_node *np = of_parse_phandle(pdev->dev.of_node,
"mediatek,wed", i);

View File

@@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/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_
@@ -4164,6 +4164,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false,
.offload_version = 2,
.hash_offset = 2,
@@ -29,7 +29,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4187,6 +4188,7 @@ static const struct mtk_soc_data mt7622_
@@ -4183,6 +4184,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false,
.offload_version = 2,
.hash_offset = 2,
@@ -37,7 +37,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4205,6 +4207,7 @@ static const struct mtk_soc_data mt7623_
@@ -4201,6 +4203,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true,
.offload_version = 2,
.hash_offset = 2,

View File

@@ -26,7 +26,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/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
@@ -3891,6 +3891,7 @@ void mtk_eth_set_dma_device(struct mtk_e
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 mtk_eth *eth;
int err, i;
@@ -3975,16 +3976,31 @@ static int mtk_probe(struct platform_dev
@@ -3971,16 +3972,31 @@ static int mtk_probe(struct platform_dev
}
}

View File

@@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
mtk_ppe_check_skb(eth->ppe[0], skb, hash);
@@ -4184,7 +4185,7 @@ static const struct mtk_soc_data mt7621_
@@ -4180,7 +4181,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false,
.offload_version = 2,
.hash_offset = 2,
@@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4204,7 +4205,7 @@ static const struct mtk_soc_data mt7622_
@@ -4200,7 +4201,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false,
.offload_version = 2,
.hash_offset = 2,
@@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4223,7 +4224,7 @@ static const struct mtk_soc_data mt7623_
@@ -4219,7 +4220,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true,
.offload_version = 2,
.hash_offset = 2,
@@ -76,7 +76,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -4255,9 +4256,11 @@ static const struct mtk_soc_data mt7986_
@@ -4251,9 +4252,11 @@ static const struct mtk_soc_data mt7986_
.reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128,
.caps = MT7986_CAPS,

View File

@@ -16,7 +16,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/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_
@@ -4255,6 +4255,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false,

View File

@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/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
@@ -4007,19 +4007,23 @@ static int mtk_probe(struct platform_dev
eth->irq[i] = platform_get_irq(pdev, i);
if (eth->irq[i] < 0) {
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;
}
@@ -4034,7 +4038,7 @@ static int mtk_probe(struct platform_dev
@@ -4030,7 +4034,7 @@ static int mtk_probe(struct platform_dev
err = mtk_hw_init(eth);
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);
@@ -4132,6 +4136,8 @@ err_free_dev:
@@ -4128,6 +4132,8 @@ err_free_dev:
mtk_free_dev(eth);
err_deinit_hw:
mtk_hw_deinit(eth);
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return err;
}
@@ -4151,6 +4157,7 @@ static int mtk_remove(struct platform_de
@@ -4147,6 +4153,7 @@ static int mtk_remove(struct platform_de
phylink_disconnect_phy(mac->phylink);
}

View File

@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3176,6 +3176,30 @@ static void mtk_dim_tx(struct work_struc
@@ -3179,6 +3179,30 @@ static void mtk_dim_tx(struct work_struc
dim->state = DIM_START_MEASURE;
}
@@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int mtk_hw_init(struct mtk_eth *eth)
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3250,8 +3274,16 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3253,8 +3277,16 @@ static int mtk_hw_init(struct mtk_eth *e
* up with the more appropriate value when mtk_mac_config call is being
* invoked.
*/
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Indicates CDM to parse the MTK special tag from CPU
* which also is working out for untag packets.
@@ -3367,7 +3399,6 @@ static int mtk_change_mtu(struct net_dev
@@ -3353,7 +3385,6 @@ static int mtk_change_mtu(struct net_dev
int length = new_mtu + MTK_RX_ETH_HLEN;
struct mtk_mac *mac = netdev_priv(dev);
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) &&
length > MTK_PP_MAX_BUF_SIZE) {
@@ -3375,23 +3406,7 @@ static int mtk_change_mtu(struct net_dev
@@ -3361,23 +3392,7 @@ static int mtk_change_mtu(struct net_dev
return -EINVAL;
}

View File

@@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/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
@@ -3423,11 +3423,8 @@ static void mtk_pending_work(struct work
rtnl_lock();
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 */
for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i])
@@ -3475,7 +3472,7 @@ static void mtk_pending_work(struct work
@@ -3461,7 +3458,7 @@ static void mtk_pending_work(struct work
dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);

View File

@@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3239,16 +3239,17 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3242,16 +3242,17 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
}

View File

@@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3200,6 +3200,27 @@ static void mtk_set_mcr_max_rx(struct mt
@@ -3203,6 +3203,27 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
}
@@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth)
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3239,22 +3260,9 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3242,22 +3263,9 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
}

View File

@@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3221,7 +3221,54 @@ static void mtk_hw_reset(struct mtk_eth
@@ -3224,7 +3224,54 @@ static void mtk_hw_reset(struct mtk_eth
0x3ffffff);
}
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE;
@@ -3260,7 +3307,12 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3263,7 +3310,12 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
}
@@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
/* Set FE to PDMAv2 if necessary */
@@ -3465,7 +3517,7 @@ static void mtk_pending_work(struct work
@@ -3451,7 +3503,7 @@ static void mtk_pending_work(struct work
if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p,
eth->dev->pins->default_state);
@@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* restart DMA and enable IRQs */
for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -4057,7 +4109,7 @@ static int mtk_probe(struct platform_dev
@@ -4053,7 +4105,7 @@ static int mtk_probe(struct platform_dev
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
INIT_WORK(&eth->pending_work, mtk_pending_work);

View File

@@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2786,14 +2786,29 @@ static void mtk_dma_free(struct mtk_eth
@@ -2789,14 +2789,29 @@ static void mtk_dma_free(struct mtk_eth
kfree(eth->scratch_head);
}
@@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
schedule_work(&eth->pending_work);
}
@@ -3275,15 +3290,17 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3278,15 +3293,17 @@ static int mtk_hw_init(struct mtk_eth *e
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int i, val, ret;
@@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->ethsys)
regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask,
@@ -3409,8 +3426,10 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3412,8 +3429,10 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
err_disable_pm:
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return ret;
}
@@ -3489,30 +3508,53 @@ static int mtk_do_ioctl(struct net_devic
@@ -3475,30 +3494,53 @@ static int mtk_do_ioctl(struct net_devic
return -EOPNOTSUPP;
}
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p,
@@ -3523,15 +3565,19 @@ static void mtk_pending_work(struct work
@@ -3509,15 +3551,19 @@ static void mtk_pending_work(struct work
for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!test_bit(i, &restart))
continue;

View File

@@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
};
/* strings used by ethtool */
@@ -3283,6 +3289,102 @@ static void mtk_hw_warm_reset(struct mtk
@@ -3286,6 +3292,102 @@ static void mtk_hw_warm_reset(struct mtk
val, rst_mask);
}
@@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
static int mtk_hw_init(struct mtk_eth *eth, bool reset)
{
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
@@ -3601,6 +3703,7 @@ static int mtk_cleanup(struct mtk_eth *e
mtk_unreg_dev(eth);
mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work);
@@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0;
}
@@ -4042,6 +4145,7 @@ static int mtk_probe(struct platform_dev
@@ -4038,6 +4141,7 @@ static int mtk_probe(struct platform_dev
eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->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;
INIT_WORK(&eth->tx_dim.work, mtk_dim_tx);
@@ -4246,6 +4350,8 @@ static int mtk_probe(struct platform_dev
@@ -4242,6 +4346,8 @@ static int mtk_probe(struct platform_dev
NAPI_POLL_WEIGHT);
platform_set_drvdata(pdev, eth);

View File

@@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/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
@@ -3632,6 +3632,11 @@ static void mtk_pending_work(struct work
set_bit(MTK_RESETTING, &eth->state);
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 */
for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -3683,6 +3688,8 @@ static void mtk_pending_work(struct work
@@ -3669,6 +3674,8 @@ static void mtk_pending_work(struct work
clear_bit(MTK_RESETTING, &eth->state);

View File

@@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_pdma, ring->phys_pdma);
ring->dma_pdma = NULL;
}
@@ -2774,7 +2780,7 @@ static void mtk_dma_free(struct mtk_eth
@@ -2777,7 +2783,7 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev,

View File

@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/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_
@@ -4424,7 +4424,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = {
@@ -4467,7 +4467,7 @@ static const struct mtk_soc_data mt7623_
@@ -4463,7 +4463,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,

View File

@@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} else {
mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0);
@@ -2904,7 +3020,7 @@ static int mtk_start_dma(struct mtk_eth
@@ -2907,7 +3023,7 @@ static int mtk_start_dma(struct mtk_eth
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
@@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
else
val |= MTK_RX_BT_32DWORDS;
mtk_w32(eth, val, reg_map->qdma.glo_cfg);
@@ -2950,6 +3066,45 @@ static void mtk_gdm_config(struct mtk_et
@@ -2953,6 +3069,45 @@ static void mtk_gdm_config(struct mtk_et
mtk_w32(eth, 0, MTK_RST_GL);
}
@@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_open(struct net_device *dev)
{
struct mtk_mac *mac = netdev_priv(dev);
@@ -2994,7 +3149,8 @@ static int mtk_open(struct net_device *d
@@ -2997,7 +3152,8 @@ static int mtk_open(struct net_device *d
refcount_inc(&eth->dma_refcnt);
phylink_start(mac->phylink);
@@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
}
@@ -3717,8 +3873,12 @@ static int mtk_unreg_dev(struct mtk_eth
@@ -3703,8 +3859,12 @@ static int mtk_unreg_dev(struct mtk_eth
int 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]);
}
@@ -3935,6 +4095,23 @@ static int mtk_set_rxnfc(struct net_devi
@@ -3921,6 +4081,23 @@ static int mtk_set_rxnfc(struct net_devi
return ret;
}
@@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings,
@@ -3970,6 +4147,7 @@ static const struct net_device_ops mtk_n
@@ -3955,6 +4132,7 @@ static const struct net_device_ops mtk_n
.ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp,
.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)
@@ -3979,6 +4157,7 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -3964,6 +4142,7 @@ static int mtk_add_mac(struct mtk_eth *e
struct phylink *phylink;
struct mtk_mac *mac;
int id, err;
@@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!_id) {
dev_err(eth->dev, "missing mac id\n");
@@ -3996,7 +4175,10 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -3981,7 +4160,10 @@ static int mtk_add_mac(struct mtk_eth *e
return -EINVAL;
}
@@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!eth->netdev[id]) {
dev_err(eth->dev, "alloc_etherdev failed\n");
return -ENOMEM;
@@ -4093,6 +4275,11 @@ static int mtk_add_mac(struct mtk_eth *e
@@ -4089,6 +4271,11 @@ static int mtk_add_mac(struct mtk_eth *e
else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;

View File

@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
skb_record_rx_queue(skb, 0);
@@ -2800,15 +2807,30 @@ static netdev_features_t mtk_fix_feature
@@ -2803,15 +2810,30 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
/* wait for DMA to finish whatever it is doing before we start using it again */
@@ -3105,11 +3127,45 @@ found:
@@ -3108,11 +3130,45 @@ found:
return NOTIFY_DONE;
}
@@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) {
@@ -3632,6 +3688,10 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3635,6 +3691,10 @@ static int mtk_hw_init(struct mtk_eth *e
*/
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -3865,6 +3925,12 @@ static int mtk_free_dev(struct mtk_eth *
@@ -3851,6 +3911,12 @@ static int mtk_free_dev(struct mtk_eth *
free_netdev(eth->netdev[i]);
}

View File

@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3712,9 +3712,12 @@ static int mtk_hw_init(struct mtk_eth *e
@@ -3715,9 +3715,12 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {

View File

@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3143,7 +3143,8 @@ static int mtk_open(struct net_device *d
@@ -3146,7 +3146,8 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw;
int i, err;
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3160,7 +3161,8 @@ static int mtk_open(struct net_device *d
@@ -3163,7 +3164,8 @@ static int mtk_open(struct net_device *d
}
} else {
/* Hardware special tag parsing needs to be disabled if at least

View File

@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3078,7 +3078,7 @@ static void mtk_gdm_config(struct mtk_et
@@ -3081,7 +3081,7 @@ static void mtk_gdm_config(struct mtk_et
val |= config;
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
@@ -3143,8 +3143,7 @@ static int mtk_open(struct net_device *d
@@ -3146,8 +3146,7 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw;
int i, err;
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = eth->dsa_meta[i];
@@ -3161,8 +3160,7 @@ static int mtk_open(struct net_device *d
@@ -3164,8 +3163,7 @@ static int mtk_open(struct net_device *d
}
} else {
/* Hardware special tag parsing needs to be disabled if at least

View File

@@ -34,7 +34,7 @@
mtk_eth_path_name(path), __func__, updated);
--- a/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_
@@ -4751,6 +4751,26 @@ static const struct mtk_soc_data mt7629_
},
};
@@ -61,7 +61,7 @@
static const struct mtk_soc_data mt7986_data = {
.reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128,
@@ -4797,6 +4817,7 @@ const struct of_device_id of_mtk_match[]
@@ -4793,6 +4813,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
return NULL;
@@ -3977,8 +3978,17 @@ static int mtk_unreg_dev(struct mtk_eth
@@ -3963,8 +3964,17 @@ static int mtk_unreg_dev(struct mtk_eth
return 0;
}
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_unreg_dev(eth);
mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work);
@@ -4408,6 +4418,36 @@ void mtk_eth_set_dma_device(struct mtk_e
@@ -4404,6 +4414,36 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_unlock();
}
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int mtk_probe(struct platform_device *pdev)
{
struct resource *res = NULL;
@@ -4471,13 +4511,7 @@ static int mtk_probe(struct platform_dev
@@ -4467,13 +4507,7 @@ static int mtk_probe(struct platform_dev
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (err)
return err;
@@ -4488,14 +4522,17 @@ static int mtk_probe(struct platform_dev
@@ -4484,14 +4518,17 @@ static int mtk_probe(struct platform_dev
"mediatek,pctl");
if (IS_ERR(eth->pctl)) {
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) {
@@ -4655,6 +4692,8 @@ err_deinit_hw:
@@ -4651,6 +4688,8 @@ err_deinit_hw:
mtk_hw_deinit(eth);
err_wed_exit:
mtk_wed_exit();

View File

@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -1412,6 +1412,19 @@ static struct phy_driver at803x_driver[]
@@ -1410,6 +1410,19 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
@@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, };
module_phy_driver(at803x_driver);
@@ -1422,6 +1435,8 @@ static struct mdio_device_id __maybe_unu
@@ -1420,6 +1433,8 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },

View File

@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define QCA8337_PHY_ID 0x004dd036
#define QCA8K_PHY_ID_MASK 0xffffffff
@@ -1413,10 +1414,23 @@ static struct phy_driver at803x_driver[]
@@ -1411,10 +1412,23 @@ static struct phy_driver at803x_driver[]
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* PHY_GBIT_FEATURES */
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
@@ -1436,7 +1450,8 @@ static struct mdio_device_id __maybe_unu
@@ -1434,7 +1448,8 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
{ PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) },

View File

@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -1413,6 +1413,8 @@ static struct phy_driver at803x_driver[]
@@ -1411,6 +1411,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, {
/* QCA8327-A from switch QCA8327-AL1A */
.phy_id = QCA8327_A_PHY_ID,
@@ -1426,6 +1428,8 @@ static struct phy_driver at803x_driver[]
@@ -1424,6 +1426,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, {
/* QCA8327-B from switch QCA8327-BL1A */
.phy_id = QCA8327_B_PHY_ID,
@@ -1439,6 +1443,8 @@ static struct phy_driver at803x_driver[]
@@ -1437,6 +1441,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,

View File

@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -1402,47 +1402,47 @@ static struct phy_driver at803x_driver[]
@@ -1400,47 +1400,47 @@ static struct phy_driver at803x_driver[]
.config_aneg = at803x_config_aneg,
}, {
/* QCA8337 */

View File

@@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static struct phy_driver at803x_driver[] = {
{
/* Qualcomm Atheros AR8035 */
@@ -1413,8 +1470,8 @@ static struct phy_driver at803x_driver[]
@@ -1411,8 +1468,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
@@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, {
/* QCA8327-A from switch QCA8327-AL1A */
.phy_id = QCA8327_A_PHY_ID,
@@ -1428,8 +1485,8 @@ static struct phy_driver at803x_driver[]
@@ -1426,8 +1483,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
@@ -118,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, {
/* QCA8327-B from switch QCA8327-BL1A */
.phy_id = QCA8327_B_PHY_ID,
@@ -1443,8 +1500,8 @@ static struct phy_driver at803x_driver[]
@@ -1441,8 +1498,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,

View File

@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int qca83xx_resume(struct phy_device *phydev)
{
int ret, val;
@@ -1463,6 +1493,7 @@ static struct phy_driver at803x_driver[]
@@ -1461,6 +1491,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8337 internal PHY",
/* PHY_GBIT_FEATURES */
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
.config_init = qca83xx_config_init,
@@ -1478,6 +1509,7 @@ static struct phy_driver at803x_driver[]
@@ -1476,6 +1507,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8327-A internal PHY",
/* PHY_GBIT_FEATURES */
@@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
.config_init = qca83xx_config_init,
@@ -1493,6 +1525,7 @@ static struct phy_driver at803x_driver[]
@@ -1491,6 +1523,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8327-B internal PHY",
/* PHY_GBIT_FEATURES */

View File

@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
@@ -1712,9 +1715,6 @@ static int __init_dma_rx_desc_rings(stru
@@ -1713,9 +1716,6 @@ static int __init_dma_rx_desc_rings(stru
return -ENOMEM;
}
@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Setup the chained descriptor addresses */
if (priv->mode == STMMAC_CHAIN_MODE) {
if (priv->extend_desc)
@@ -1820,12 +1820,6 @@ static int __init_dma_tx_desc_rings(stru
@@ -1821,12 +1821,6 @@ static int __init_dma_tx_desc_rings(stru
tx_q->tx_skbuff[i] = NULL;
}
@@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return 0;
}
@@ -2694,10 +2688,7 @@ static void stmmac_tx_err(struct stmmac_
@@ -2695,10 +2689,7 @@ static void stmmac_tx_err(struct stmmac_
stmmac_stop_tx_dma(priv, chan);
dma_free_tx_skbufs(priv, chan);
stmmac_clear_tx_descriptors(priv, chan);
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
stmmac_start_tx_dma(priv, chan);
@@ -3781,6 +3772,8 @@ static int stmmac_open(struct net_device
@@ -3782,6 +3773,8 @@ static int stmmac_open(struct net_device
}
}
@@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ret = stmmac_hw_setup(dev, true);
if (ret < 0) {
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
@@ -6430,6 +6423,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6429,6 +6422,7 @@ void stmmac_enable_rx_queue(struct stmma
return;
}
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_rx_descriptors(priv, queue);
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -6491,6 +6485,7 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6490,6 +6484,7 @@ void stmmac_enable_tx_queue(struct stmma
return;
}
@@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_tx_descriptors(priv, queue);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -7417,6 +7412,25 @@ int stmmac_suspend(struct device *dev)
@@ -7414,6 +7409,25 @@ int stmmac_suspend(struct device *dev)
}
EXPORT_SYMBOL_GPL(stmmac_suspend);
@@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/**
* stmmac_reset_queues_param - reset queue parameters
* @priv: device pointer
@@ -7427,22 +7441,11 @@ static void stmmac_reset_queues_param(st
@@ -7424,22 +7438,11 @@ static void stmmac_reset_queues_param(st
u32 tx_cnt = priv->plat->tx_queues_to_use;
u32 queue;

View File

@@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3833,8 +3833,6 @@ static int stmmac_release(struct net_dev
@@ -3834,8 +3834,6 @@ static int stmmac_release(struct net_dev
struct stmmac_priv *priv = netdev_priv(dev);
u32 chan;
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (device_may_wakeup(priv->device))
phylink_speed_down(priv->phylink, false);
/* Stop and disconnect the PHY */
@@ -3846,6 +3844,8 @@ static int stmmac_release(struct net_dev
@@ -3847,6 +3845,8 @@ static int stmmac_release(struct net_dev
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
hrtimer_cancel(&priv->tx_queue[chan].txtimer);

View File

@@ -189,7 +189,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (tx_q->dirty_tx != tx_q->cur_tx)
return -EBUSY; /* still unfinished work */
@@ -1309,7 +1309,7 @@ static void stmmac_display_rx_rings(stru
@@ -1310,7 +1310,7 @@ static void stmmac_display_rx_rings(stru
/* Display RX rings */
for (queue = 0; queue < rx_cnt; queue++) {
@@ -198,7 +198,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pr_info("\tRX Queue %u rings\n", queue);
@@ -1322,7 +1322,7 @@ static void stmmac_display_rx_rings(stru
@@ -1323,7 +1323,7 @@ static void stmmac_display_rx_rings(stru
}
/* Display RX ring */
@@ -207,7 +207,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
}
@@ -1336,7 +1336,7 @@ static void stmmac_display_tx_rings(stru
@@ -1337,7 +1337,7 @@ static void stmmac_display_tx_rings(stru
/* Display TX rings */
for (queue = 0; queue < tx_cnt; queue++) {
@@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pr_info("\tTX Queue %d rings\n", queue);
@@ -1351,7 +1351,7 @@ static void stmmac_display_tx_rings(stru
@@ -1352,7 +1352,7 @@ static void stmmac_display_tx_rings(stru
desc_size = sizeof(struct dma_desc);
}
@@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->dma_tx_phy, desc_size);
}
}
@@ -1392,21 +1392,21 @@ static int stmmac_set_bfsize(int mtu, in
@@ -1393,21 +1393,21 @@ static int stmmac_set_bfsize(int mtu, in
*/
static void stmmac_clear_rx_descriptors(struct stmmac_priv *priv, u32 queue)
{
@@ -253,7 +253,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
/**
@@ -1418,12 +1418,12 @@ static void stmmac_clear_rx_descriptors(
@@ -1419,12 +1419,12 @@ static void stmmac_clear_rx_descriptors(
*/
static void stmmac_clear_tx_descriptors(struct stmmac_priv *priv, u32 queue)
{
@@ -269,7 +269,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
if (priv->extend_desc)
@@ -1471,7 +1471,7 @@ static void stmmac_clear_descriptors(str
@@ -1472,7 +1472,7 @@ static void stmmac_clear_descriptors(str
static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
int i, gfp_t flags, u32 queue)
{
@@ -278,7 +278,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (!buf->page) {
@@ -1496,7 +1496,7 @@ static int stmmac_init_rx_buffers(struct
@@ -1497,7 +1497,7 @@ static int stmmac_init_rx_buffers(struct
buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset;
stmmac_set_desc_addr(priv, p, buf->addr);
@@ -287,7 +287,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_desc3(priv, p);
return 0;
@@ -1510,7 +1510,7 @@ static int stmmac_init_rx_buffers(struct
@@ -1511,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct
*/
static void stmmac_free_rx_buffer(struct stmmac_priv *priv, u32 queue, int i)
{
@@ -296,7 +296,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (buf->page)
@@ -1530,7 +1530,7 @@ static void stmmac_free_rx_buffer(struct
@@ -1531,7 +1531,7 @@ static void stmmac_free_rx_buffer(struct
*/
static void stmmac_free_tx_buffer(struct stmmac_priv *priv, u32 queue, int i)
{
@@ -305,7 +305,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (tx_q->tx_skbuff_dma[i].buf &&
tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) {
@@ -1575,17 +1575,17 @@ static void dma_free_rx_skbufs(struct st
@@ -1576,17 +1576,17 @@ static void dma_free_rx_skbufs(struct st
{
int i;
@@ -326,7 +326,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
int ret;
@@ -1612,10 +1612,10 @@ static int stmmac_alloc_rx_buffers(struc
@@ -1613,10 +1613,10 @@ static int stmmac_alloc_rx_buffers(struc
*/
static void dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue)
{
@@ -339,7 +339,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (!buf->xdp)
@@ -1628,10 +1628,10 @@ static void dma_free_rx_xskbufs(struct s
@@ -1629,10 +1629,10 @@ static void dma_free_rx_xskbufs(struct s
static int stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue)
{
@@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf;
dma_addr_t dma_addr;
struct dma_desc *p;
@@ -1674,7 +1674,7 @@ static struct xsk_buff_pool *stmmac_get_
@@ -1675,7 +1675,7 @@ static struct xsk_buff_pool *stmmac_get_
*/
static int __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags)
{
@@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int ret;
netif_dbg(priv, probe, priv->dev,
@@ -1720,11 +1720,11 @@ static int __init_dma_rx_desc_rings(stru
@@ -1721,11 +1721,11 @@ static int __init_dma_rx_desc_rings(stru
if (priv->extend_desc)
stmmac_mode_init(priv, rx_q->dma_erx,
rx_q->dma_rx_phy,
@@ -375,7 +375,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
return 0;
@@ -1751,7 +1751,7 @@ static int init_dma_rx_desc_rings(struct
@@ -1752,7 +1752,7 @@ static int init_dma_rx_desc_rings(struct
err_init_rx_buffers:
while (queue >= 0) {
@@ -384,7 +384,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (rx_q->xsk_pool)
dma_free_rx_xskbufs(priv, queue);
@@ -1780,7 +1780,7 @@ err_init_rx_buffers:
@@ -1781,7 +1781,7 @@ err_init_rx_buffers:
*/
static int __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue)
{
@@ -393,7 +393,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int i;
netif_dbg(priv, probe, priv->dev,
@@ -1792,16 +1792,16 @@ static int __init_dma_tx_desc_rings(stru
@@ -1793,16 +1793,16 @@ static int __init_dma_tx_desc_rings(stru
if (priv->extend_desc)
stmmac_mode_init(priv, tx_q->dma_etx,
tx_q->dma_tx_phy,
@@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
if (priv->extend_desc)
@@ -1871,12 +1871,12 @@ static int init_dma_desc_rings(struct ne
@@ -1872,12 +1872,12 @@ static int init_dma_desc_rings(struct ne
*/
static void dma_free_tx_skbufs(struct stmmac_priv *priv, u32 queue)
{
@@ -428,7 +428,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_free_tx_buffer(priv, queue, i);
if (tx_q->xsk_pool && tx_q->xsk_frames_done) {
@@ -1906,7 +1906,7 @@ static void stmmac_free_tx_skbufs(struct
@@ -1907,7 +1907,7 @@ static void stmmac_free_tx_skbufs(struct
*/
static void __free_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue)
{
@@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Release the DMA RX socket buffers */
if (rx_q->xsk_pool)
@@ -1919,11 +1919,11 @@ static void __free_dma_rx_desc_resources
@@ -1920,11 +1920,11 @@ static void __free_dma_rx_desc_resources
/* Free DMA regions of consistent memory previously allocated */
if (!priv->extend_desc)
@@ -451,7 +451,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_extended_desc),
rx_q->dma_erx, rx_q->dma_rx_phy);
@@ -1952,7 +1952,7 @@ static void free_dma_rx_desc_resources(s
@@ -1953,7 +1953,7 @@ static void free_dma_rx_desc_resources(s
*/
static void __free_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue)
{
@@ -460,7 +460,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
size_t size;
void *addr;
@@ -1970,7 +1970,7 @@ static void __free_dma_tx_desc_resources
@@ -1971,7 +1971,7 @@ static void __free_dma_tx_desc_resources
addr = tx_q->dma_tx;
}
@@ -469,7 +469,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy);
@@ -1999,7 +1999,7 @@ static void free_dma_tx_desc_resources(s
@@ -2000,7 +2000,7 @@ static void free_dma_tx_desc_resources(s
*/
static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv, u32 queue)
{
@@ -478,7 +478,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
bool xdp_prog = stmmac_xdp_is_enabled(priv);
struct page_pool_params pp_params = { 0 };
@@ -2011,8 +2011,8 @@ static int __alloc_dma_rx_desc_resources
@@ -2012,8 +2012,8 @@ static int __alloc_dma_rx_desc_resources
rx_q->priv_data = priv;
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
@@ -489,7 +489,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pp_params.order = ilog2(num_pages);
pp_params.nid = dev_to_node(priv->device);
pp_params.dev = priv->device;
@@ -2027,7 +2027,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2028,7 +2028,7 @@ static int __alloc_dma_rx_desc_resources
return ret;
}
@@ -498,7 +498,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(*rx_q->buf_pool),
GFP_KERNEL);
if (!rx_q->buf_pool)
@@ -2035,7 +2035,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2036,7 +2036,7 @@ static int __alloc_dma_rx_desc_resources
if (priv->extend_desc) {
rx_q->dma_erx = dma_alloc_coherent(priv->device,
@@ -507,7 +507,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_extended_desc),
&rx_q->dma_rx_phy,
GFP_KERNEL);
@@ -2044,7 +2044,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2045,7 +2045,7 @@ static int __alloc_dma_rx_desc_resources
} else {
rx_q->dma_rx = dma_alloc_coherent(priv->device,
@@ -516,7 +516,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_desc),
&rx_q->dma_rx_phy,
GFP_KERNEL);
@@ -2101,20 +2101,20 @@ err_dma:
@@ -2102,20 +2102,20 @@ err_dma:
*/
static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv, u32 queue)
{
@@ -540,7 +540,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct sk_buff *),
GFP_KERNEL);
if (!tx_q->tx_skbuff)
@@ -2127,7 +2127,7 @@ static int __alloc_dma_tx_desc_resources
@@ -2128,7 +2128,7 @@ static int __alloc_dma_tx_desc_resources
else
size = sizeof(struct dma_desc);
@@ -549,7 +549,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
addr = dma_alloc_coherent(priv->device, size,
&tx_q->dma_tx_phy, GFP_KERNEL);
@@ -2371,7 +2371,7 @@ static void stmmac_dma_operation_mode(st
@@ -2372,7 +2372,7 @@ static void stmmac_dma_operation_mode(st
/* configure all channels */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -558,7 +558,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
u32 buf_size;
qmode = priv->plat->rx_queues_cfg[chan].mode_to_use;
@@ -2386,7 +2386,7 @@ static void stmmac_dma_operation_mode(st
@@ -2387,7 +2387,7 @@ static void stmmac_dma_operation_mode(st
chan);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -567,7 +567,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
chan);
}
}
@@ -2402,7 +2402,7 @@ static void stmmac_dma_operation_mode(st
@@ -2403,7 +2403,7 @@ static void stmmac_dma_operation_mode(st
static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
{
struct netdev_queue *nq = netdev_get_tx_queue(priv->dev, queue);
@@ -576,7 +576,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct xsk_buff_pool *pool = tx_q->xsk_pool;
unsigned int entry = tx_q->cur_tx;
struct dma_desc *tx_desc = NULL;
@@ -2477,7 +2477,7 @@ static bool stmmac_xdp_xmit_zc(struct st
@@ -2478,7 +2478,7 @@ static bool stmmac_xdp_xmit_zc(struct st
stmmac_enable_dma_transmission(priv, priv->ioaddr);
@@ -585,7 +585,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
entry = tx_q->cur_tx;
}
@@ -2503,7 +2503,7 @@ static bool stmmac_xdp_xmit_zc(struct st
@@ -2504,7 +2504,7 @@ static bool stmmac_xdp_xmit_zc(struct st
*/
static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
{
@@ -594,7 +594,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int bytes_compl = 0, pkts_compl = 0;
unsigned int entry, xmits = 0, count = 0;
@@ -2516,7 +2516,7 @@ static int stmmac_tx_clean(struct stmmac
@@ -2517,7 +2517,7 @@ static int stmmac_tx_clean(struct stmmac
entry = tx_q->dirty_tx;
/* Try to clean all TX complete frame in 1 shot */
@@ -603,7 +603,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct xdp_frame *xdpf;
struct sk_buff *skb;
struct dma_desc *p;
@@ -2616,7 +2616,7 @@ static int stmmac_tx_clean(struct stmmac
@@ -2617,7 +2617,7 @@ static int stmmac_tx_clean(struct stmmac
stmmac_release_tx_desc(priv, p, priv->mode);
@@ -612,7 +612,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
tx_q->dirty_tx = entry;
@@ -2681,7 +2681,7 @@ static int stmmac_tx_clean(struct stmmac
@@ -2682,7 +2682,7 @@ static int stmmac_tx_clean(struct stmmac
*/
static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
{
@@ -621,7 +621,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));
@@ -2748,8 +2748,8 @@ static int stmmac_napi_check(struct stmm
@@ -2749,8 +2749,8 @@ static int stmmac_napi_check(struct stmm
{
int status = stmmac_dma_interrupt_status(priv, priv->ioaddr,
&priv->xstats, chan, dir);
@@ -632,7 +632,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[chan];
struct napi_struct *rx_napi;
struct napi_struct *tx_napi;
@@ -2925,7 +2925,7 @@ static int stmmac_init_dma_engine(struct
@@ -2926,7 +2926,7 @@ static int stmmac_init_dma_engine(struct
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -641,7 +641,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
@@ -2939,7 +2939,7 @@ static int stmmac_init_dma_engine(struct
@@ -2940,7 +2940,7 @@ static int stmmac_init_dma_engine(struct
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_channels_count; chan++) {
@@ -650,7 +650,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -2954,7 +2954,7 @@ static int stmmac_init_dma_engine(struct
@@ -2955,7 +2955,7 @@ static int stmmac_init_dma_engine(struct
static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue)
{
@@ -659,7 +659,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
hrtimer_start(&tx_q->txtimer,
STMMAC_COAL_TIMER(priv->tx_coal_timer[queue]),
@@ -3004,7 +3004,7 @@ static void stmmac_init_coalesce(struct
@@ -3005,7 +3005,7 @@ static void stmmac_init_coalesce(struct
u32 chan;
for (chan = 0; chan < tx_channel_count; chan++) {
@@ -668,7 +668,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
priv->tx_coal_frames[chan] = STMMAC_TX_FRAMES;
priv->tx_coal_timer[chan] = STMMAC_COAL_TX_TIMER;
@@ -3026,12 +3026,12 @@ static void stmmac_set_rings_length(stru
@@ -3027,12 +3027,12 @@ static void stmmac_set_rings_length(stru
/* set TX ring length */
for (chan = 0; chan < tx_channels_count; chan++)
stmmac_set_tx_ring_len(priv, priv->ioaddr,
@@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
/**
@@ -3366,7 +3366,7 @@ static int stmmac_hw_setup(struct net_de
@@ -3367,7 +3367,7 @@ static int stmmac_hw_setup(struct net_de
/* Enable TSO */
if (priv->tso) {
for (chan = 0; chan < tx_cnt; chan++) {
@@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* TSO and TBS cannot co-exist */
if (tx_q->tbs & STMMAC_TBS_AVAIL)
@@ -3388,7 +3388,7 @@ static int stmmac_hw_setup(struct net_de
@@ -3389,7 +3389,7 @@ static int stmmac_hw_setup(struct net_de
/* TBS */
for (chan = 0; chan < tx_cnt; chan++) {
@@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int enable = tx_q->tbs & STMMAC_TBS_AVAIL;
stmmac_enable_tbs(priv, priv->ioaddr, enable, chan);
@@ -3432,7 +3432,7 @@ static void stmmac_free_irq(struct net_d
@@ -3433,7 +3433,7 @@ static void stmmac_free_irq(struct net_d
for (j = irq_idx - 1; j >= 0; j--) {
if (priv->tx_irq[j] > 0) {
irq_set_affinity_hint(priv->tx_irq[j], NULL);
@@ -710,7 +710,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
irq_idx = priv->plat->rx_queues_to_use;
@@ -3441,7 +3441,7 @@ static void stmmac_free_irq(struct net_d
@@ -3442,7 +3442,7 @@ static void stmmac_free_irq(struct net_d
for (j = irq_idx - 1; j >= 0; j--) {
if (priv->rx_irq[j] > 0) {
irq_set_affinity_hint(priv->rx_irq[j], NULL);
@@ -719,7 +719,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
@@ -3574,7 +3574,7 @@ static int stmmac_request_irq_multi_msi(
@@ -3575,7 +3575,7 @@ static int stmmac_request_irq_multi_msi(
sprintf(int_name, "%s:%s-%d", dev->name, "rx", i);
ret = request_irq(priv->rx_irq[i],
stmmac_msi_intr_rx,
@@ -728,7 +728,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(ret < 0)) {
netdev_err(priv->dev,
"%s: alloc rx-%d MSI %d (error: %d)\n",
@@ -3597,7 +3597,7 @@ static int stmmac_request_irq_multi_msi(
@@ -3598,7 +3598,7 @@ static int stmmac_request_irq_multi_msi(
sprintf(int_name, "%s:%s-%d", dev->name, "tx", i);
ret = request_irq(priv->tx_irq[i],
stmmac_msi_intr_tx,
@@ -737,7 +737,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(ret < 0)) {
netdev_err(priv->dev,
"%s: alloc tx-%d MSI %d (error: %d)\n",
@@ -3728,21 +3728,21 @@ static int stmmac_open(struct net_device
@@ -3729,21 +3729,21 @@ static int stmmac_open(struct net_device
bfsize = 0;
if (bfsize < BUF_SIZE_16KiB)
@@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
/* Setup per-TXQ tbs flag before TX descriptor alloc */
@@ -3800,7 +3800,7 @@ irq_error:
@@ -3801,7 +3801,7 @@ irq_error:
phylink_stop(priv->phylink);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -3842,7 +3842,7 @@ static int stmmac_release(struct net_dev
@@ -3843,7 +3843,7 @@ static int stmmac_release(struct net_dev
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
netif_tx_disable(dev);
@@ -3906,7 +3906,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3907,7 +3907,7 @@ static bool stmmac_vlan_insert(struct st
return false;
stmmac_set_tx_owner(priv, p);
@@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return true;
}
@@ -3924,7 +3924,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3925,7 +3925,7 @@ static bool stmmac_vlan_insert(struct st
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
int total_len, bool last_segment, u32 queue)
{
@@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *desc;
u32 buff_size;
int tmp_len;
@@ -3935,7 +3935,7 @@ static void stmmac_tso_allocator(struct
@@ -3936,7 +3936,7 @@ static void stmmac_tso_allocator(struct
dma_addr_t curr_addr;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
if (tx_q->tbs & STMMAC_TBS_AVAIL)
@@ -3963,7 +3963,7 @@ static void stmmac_tso_allocator(struct
@@ -3964,7 +3964,7 @@ static void stmmac_tso_allocator(struct
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
{
@@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int desc_size;
if (likely(priv->extend_desc))
@@ -4025,7 +4025,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4026,7 +4026,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
dma_addr_t des;
int i;
@@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
/* Compute header lengths */
@@ -4065,7 +4065,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4066,7 +4066,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
stmmac_set_mss(priv, mss_desc, mss);
tx_q->mss = mss;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
}
@@ -4177,7 +4177,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4178,7 +4178,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
@@ -4265,7 +4265,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4266,7 +4266,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int entry, first_tx;
dma_addr_t des;
@@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
@@ -4328,7 +4328,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4329,7 +4329,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int len = skb_frag_size(frag);
bool last_segment = (i == (nfrags - 1));
@@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[entry]);
if (likely(priv->extend_desc))
@@ -4399,7 +4399,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4400,7 +4400,7 @@ static netdev_tx_t stmmac_xmit(struct sk
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
if (netif_msg_pktdata(priv)) {
@@ -4514,7 +4514,7 @@ static void stmmac_rx_vlan(struct net_de
@@ -4512,7 +4512,7 @@ static void stmmac_rx_vlan(struct net_de
*/
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
{
@@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int entry = rx_q->dirty_rx;
@@ -4564,7 +4564,7 @@ static inline void stmmac_rx_refill(stru
@@ -4562,7 +4562,7 @@ static inline void stmmac_rx_refill(stru
dma_wmb();
stmmac_set_rx_owner(priv, p, use_rx_wd);
@@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
rx_q->dirty_rx = entry;
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
@@ -4592,12 +4592,12 @@ static unsigned int stmmac_rx_buf1_len(s
@@ -4590,12 +4590,12 @@ static unsigned int stmmac_rx_buf1_len(s
/* First descriptor, not last descriptor and not split header */
if (status & rx_not_ls)
@@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
@@ -4613,7 +4613,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4611,7 +4611,7 @@ static unsigned int stmmac_rx_buf2_len(s
/* Not last descriptor */
if (status & rx_not_ls)
@@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
plen = stmmac_get_rx_frame_len(priv, p, coe);
@@ -4624,7 +4624,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4622,7 +4622,7 @@ static unsigned int stmmac_rx_buf2_len(s
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
struct xdp_frame *xdpf, bool dma_map)
{
@@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = tx_q->cur_tx;
struct dma_desc *tx_desc;
dma_addr_t dma_addr;
@@ -4687,7 +4687,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
@@ -4685,7 +4685,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
stmmac_enable_dma_transmission(priv, priv->ioaddr);
@@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
return STMMAC_XDP_TX;
@@ -4861,7 +4861,7 @@ static void stmmac_dispatch_skb_zc(struc
@@ -4859,7 +4859,7 @@ static void stmmac_dispatch_skb_zc(struc
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
{
@@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = rx_q->dirty_rx;
struct dma_desc *rx_desc = NULL;
bool ret = true;
@@ -4904,7 +4904,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4902,7 +4902,7 @@ static bool stmmac_rx_refill_zc(struct s
dma_wmb();
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
@@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
if (rx_desc) {
@@ -4919,7 +4919,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4917,7 +4917,7 @@ static bool stmmac_rx_refill_zc(struct s
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
{
@@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int count = 0, error = 0, len = 0;
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int next_entry = rx_q->cur_rx;
@@ -4941,7 +4941,7 @@ static int stmmac_rx_zc(struct stmmac_pr
@@ -4939,7 +4939,7 @@ static int stmmac_rx_zc(struct stmmac_pr
desc_size = sizeof(struct dma_desc);
}
@@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -4988,7 +4988,7 @@ read_again:
@@ -4986,7 +4986,7 @@ read_again:
/* Prefetch the next RX descriptor */
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5109,7 +5109,7 @@ read_again:
@@ -5107,7 +5107,7 @@ read_again:
*/
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
{
@@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
int status = 0, coe = priv->hw->rx_csum;
@@ -5122,7 +5122,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5120,7 +5120,7 @@ static int stmmac_rx(struct stmmac_priv
int buf_sz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
@@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_msg_rx_status(priv)) {
void *rx_head;
@@ -5136,7 +5136,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5134,7 +5134,7 @@ static int stmmac_rx(struct stmmac_priv
desc_size = sizeof(struct dma_desc);
}
@@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -5180,7 +5180,7 @@ read_again:
@@ -5178,7 +5178,7 @@ read_again:
break;
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5314,7 +5314,7 @@ read_again:
@@ -5312,7 +5312,7 @@ read_again:
buf1_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->page, buf->page_offset, buf1_len,
@@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->page);
@@ -5326,7 +5326,7 @@ read_again:
@@ -5324,7 +5324,7 @@ read_again:
buf2_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->sec_page, 0, buf2_len,
@@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->sec_page);
@@ -5768,11 +5768,13 @@ static irqreturn_t stmmac_safety_interru
@@ -5767,11 +5767,13 @@ static irqreturn_t stmmac_safety_interru
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
{
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
@@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(!data)) {
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
@@ -5812,10 +5814,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
@@ -5811,10 +5813,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
{
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
@@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(!data)) {
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
@@ -5846,10 +5850,10 @@ static void stmmac_poll_controller(struc
@@ -5845,10 +5849,10 @@ static void stmmac_poll_controller(struc
if (priv->plat->multi_msi_en) {
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
@@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} else {
disable_irq(dev->irq);
stmmac_interrupt(dev->irq, dev);
@@ -6030,34 +6034,34 @@ static int stmmac_rings_status_show(stru
@@ -6029,34 +6033,34 @@ static int stmmac_rings_status_show(stru
return 0;
for (queue = 0; queue < rx_count; queue++) {
@@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
@@ -6404,7 +6408,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6403,7 +6407,7 @@ void stmmac_disable_rx_queue(struct stmm
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
u32 buf_size;
@@ -6441,7 +6445,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6440,7 +6444,7 @@ void stmmac_enable_rx_queue(struct stmma
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6467,7 +6471,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6466,7 +6470,7 @@ void stmmac_disable_tx_queue(struct stmm
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
int ret;
@@ -6517,7 +6521,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6516,7 +6520,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
@@ -6576,7 +6580,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6575,7 +6579,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_cnt; chan++) {
@@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
@@ -6594,7 +6598,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6593,7 +6597,7 @@ int stmmac_xdp_open(struct net_device *d
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6603,7 +6607,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6602,7 +6606,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_cnt; chan++) {
@@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -6636,7 +6640,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6635,7 +6639,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -6663,8 +6667,8 @@ int stmmac_xsk_wakeup(struct net_device
@@ -6662,8 +6666,8 @@ int stmmac_xsk_wakeup(struct net_device
queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
@@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ch = &priv->channel[queue];
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
@@ -6924,8 +6928,8 @@ int stmmac_reinit_ringparam(struct net_d
@@ -6923,8 +6927,8 @@ int stmmac_reinit_ringparam(struct net_d
if (netif_running(dev))
stmmac_release(dev);
@@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_running(dev))
ret = stmmac_open(dev);
@@ -7363,7 +7367,7 @@ int stmmac_suspend(struct device *dev)
@@ -7359,7 +7363,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
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) {
priv->tx_path_in_lpi_mode = false;
@@ -7414,7 +7418,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
@@ -7411,7 +7415,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
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->dirty_rx = 0;
@@ -7422,7 +7426,7 @@ static void stmmac_reset_rx_queue(struct
@@ -7419,7 +7423,7 @@ static void stmmac_reset_rx_queue(struct
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
{
@@ -1270,7 +1270,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (i >= priv->plat->tx_queues_to_use)
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -970,13 +970,13 @@ static int tc_setup_etf(struct stmmac_pr
@@ -971,13 +971,13 @@ static int tc_setup_etf(struct stmmac_pr
return -EOPNOTSUPP;
if (qopt->queue >= priv->plat->tx_queues_to_use)
return -EINVAL;

View File

@@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1300,7 +1300,8 @@ static int stmmac_phy_setup(struct stmma
@@ -1301,7 +1301,8 @@ static int stmmac_phy_setup(struct stmma
return 0;
}
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
u32 rx_cnt = priv->plat->rx_queues_to_use;
unsigned int desc_size;
@@ -1309,7 +1310,7 @@ static void stmmac_display_rx_rings(stru
@@ -1310,7 +1311,7 @@ static void stmmac_display_rx_rings(stru
/* Display RX rings */
for (queue = 0; queue < rx_cnt; queue++) {
@@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pr_info("\tRX Queue %u rings\n", queue);
@@ -1322,12 +1323,13 @@ static void stmmac_display_rx_rings(stru
@@ -1323,12 +1324,13 @@ static void stmmac_display_rx_rings(stru
}
/* Display RX ring */
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
u32 tx_cnt = priv->plat->tx_queues_to_use;
unsigned int desc_size;
@@ -1336,7 +1338,7 @@ static void stmmac_display_tx_rings(stru
@@ -1337,7 +1339,7 @@ static void stmmac_display_tx_rings(stru
/* Display TX rings */
for (queue = 0; queue < tx_cnt; queue++) {
@@ -61,7 +61,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pr_info("\tTX Queue %d rings\n", queue);
@@ -1351,18 +1353,19 @@ static void stmmac_display_tx_rings(stru
@@ -1352,18 +1354,19 @@ static void stmmac_display_tx_rings(stru
desc_size = sizeof(struct dma_desc);
}
@@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static int stmmac_set_bfsize(int mtu, int bufsize)
@@ -1386,44 +1389,50 @@ static int stmmac_set_bfsize(int mtu, in
@@ -1387,44 +1390,50 @@ static int stmmac_set_bfsize(int mtu, in
/**
* stmmac_clear_rx_descriptors - clear RX descriptors
* @priv: driver private structure
@@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
if (priv->extend_desc)
@@ -1440,10 +1449,12 @@ static void stmmac_clear_tx_descriptors(
@@ -1441,10 +1450,12 @@ static void stmmac_clear_tx_descriptors(
/**
* stmmac_clear_descriptors - clear descriptors
* @priv: driver private structure
@@ -161,7 +161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
u32 rx_queue_cnt = priv->plat->rx_queues_to_use;
u32 tx_queue_cnt = priv->plat->tx_queues_to_use;
@@ -1451,16 +1462,17 @@ static void stmmac_clear_descriptors(str
@@ -1452,16 +1463,17 @@ static void stmmac_clear_descriptors(str
/* Clear the RX descriptors */
for (queue = 0; queue < rx_queue_cnt; queue++)
@@ -181,7 +181,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* @p: descriptor pointer
* @i: descriptor index
* @flags: gfp flag
@@ -1468,10 +1480,12 @@ static void stmmac_clear_descriptors(str
@@ -1469,10 +1481,12 @@ static void stmmac_clear_descriptors(str
* Description: this function is called to allocate a receive buffer, perform
* the DMA mapping and init the descriptor.
*/
@@ -196,7 +196,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (!buf->page) {
@@ -1496,7 +1510,7 @@ static int stmmac_init_rx_buffers(struct
@@ -1497,7 +1511,7 @@ static int stmmac_init_rx_buffers(struct
buf->addr = page_pool_get_dma_addr(buf->page) + buf->page_offset;
stmmac_set_desc_addr(priv, p, buf->addr);
@@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_desc3(priv, p);
return 0;
@@ -1505,12 +1519,13 @@ static int stmmac_init_rx_buffers(struct
@@ -1506,12 +1520,13 @@ static int stmmac_init_rx_buffers(struct
/**
* stmmac_free_rx_buffer - free RX dma buffers
* @priv: private structure
@@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (buf->page)
@@ -1525,12 +1540,15 @@ static void stmmac_free_rx_buffer(struct
@@ -1526,12 +1541,15 @@ static void stmmac_free_rx_buffer(struct
/**
* stmmac_free_tx_buffer - free RX dma buffers
* @priv: private structure
@@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (tx_q->tx_skbuff_dma[i].buf &&
tx_q->tx_skbuff_dma[i].buf_type != STMMAC_TXBUF_T_XDP_TX) {
@@ -1569,23 +1587,28 @@ static void stmmac_free_tx_buffer(struct
@@ -1570,23 +1588,28 @@ static void stmmac_free_tx_buffer(struct
/**
* dma_free_rx_skbufs - free RX dma buffers
* @priv: private structure
@@ -276,7 +276,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
int ret;
@@ -1594,7 +1617,7 @@ static int stmmac_alloc_rx_buffers(struc
@@ -1595,7 +1618,7 @@ static int stmmac_alloc_rx_buffers(struc
else
p = rx_q->dma_rx + i;
@@ -285,7 +285,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
queue);
if (ret)
return ret;
@@ -1608,14 +1631,17 @@ static int stmmac_alloc_rx_buffers(struc
@@ -1609,14 +1632,17 @@ static int stmmac_alloc_rx_buffers(struc
/**
* dma_free_rx_xskbufs - free RX dma buffers from XSK pool
* @priv: private structure
@@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i];
if (!buf->xdp)
@@ -1626,12 +1652,14 @@ static void dma_free_rx_xskbufs(struct s
@@ -1627,12 +1653,14 @@ static void dma_free_rx_xskbufs(struct s
}
}
@@ -324,7 +324,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_rx_buffer *buf;
dma_addr_t dma_addr;
struct dma_desc *p;
@@ -1666,22 +1694,25 @@ static struct xsk_buff_pool *stmmac_get_
@@ -1667,22 +1695,25 @@ static struct xsk_buff_pool *stmmac_get_
/**
* __init_dma_rx_desc_rings - init the RX descriptor ring (per queue)
* @priv: driver private structure
@@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
xdp_rxq_info_unreg_mem_model(&rx_q->xdp_rxq);
@@ -1708,9 +1739,9 @@ static int __init_dma_rx_desc_rings(stru
@@ -1709,9 +1740,9 @@ static int __init_dma_rx_desc_rings(stru
/* RX XDP ZC buffer pool may not be populated, e.g.
* xdpsock TX-only.
*/
@@ -365,7 +365,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret < 0)
return -ENOMEM;
}
@@ -1720,17 +1751,19 @@ static int __init_dma_rx_desc_rings(stru
@@ -1721,17 +1752,19 @@ static int __init_dma_rx_desc_rings(stru
if (priv->extend_desc)
stmmac_mode_init(priv, rx_q->dma_erx,
rx_q->dma_rx_phy,
@@ -388,7 +388,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
struct stmmac_priv *priv = netdev_priv(dev);
u32 rx_count = priv->plat->rx_queues_to_use;
@@ -1742,7 +1775,7 @@ static int init_dma_rx_desc_rings(struct
@@ -1743,7 +1776,7 @@ static int init_dma_rx_desc_rings(struct
"SKB addresses:\nskb\t\tskb data\tdma data\n");
for (queue = 0; queue < rx_count; queue++) {
@@ -397,7 +397,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret)
goto err_init_rx_buffers;
}
@@ -1751,12 +1784,12 @@ static int init_dma_rx_desc_rings(struct
@@ -1752,12 +1785,12 @@ static int init_dma_rx_desc_rings(struct
err_init_rx_buffers:
while (queue >= 0) {
@@ -413,7 +413,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->buf_alloc_num = 0;
rx_q->xsk_pool = NULL;
@@ -1773,14 +1806,17 @@ err_init_rx_buffers:
@@ -1774,14 +1807,17 @@ err_init_rx_buffers:
/**
* __init_dma_tx_desc_rings - init the TX descriptor ring (per queue)
* @priv: driver private structure
@@ -434,7 +434,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int i;
netif_dbg(priv, probe, priv->dev,
@@ -1792,16 +1828,16 @@ static int __init_dma_tx_desc_rings(stru
@@ -1793,16 +1829,16 @@ static int __init_dma_tx_desc_rings(stru
if (priv->extend_desc)
stmmac_mode_init(priv, tx_q->dma_etx,
tx_q->dma_tx_phy,
@@ -454,7 +454,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *p;
if (priv->extend_desc)
@@ -1823,7 +1859,8 @@ static int __init_dma_tx_desc_rings(stru
@@ -1824,7 +1860,8 @@ static int __init_dma_tx_desc_rings(stru
return 0;
}
@@ -464,7 +464,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
struct stmmac_priv *priv = netdev_priv(dev);
u32 tx_queue_cnt;
@@ -1832,7 +1869,7 @@ static int init_dma_tx_desc_rings(struct
@@ -1833,7 +1870,7 @@ static int init_dma_tx_desc_rings(struct
tx_queue_cnt = priv->plat->tx_queues_to_use;
for (queue = 0; queue < tx_queue_cnt; queue++)
@@ -473,7 +473,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return 0;
}
@@ -1840,26 +1877,29 @@ static int init_dma_tx_desc_rings(struct
@@ -1841,26 +1878,29 @@ static int init_dma_tx_desc_rings(struct
/**
* init_dma_desc_rings - init the RX/TX descriptor rings
* @dev: net device structure
@@ -508,7 +508,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return ret;
}
@@ -1867,17 +1907,20 @@ static int init_dma_desc_rings(struct ne
@@ -1868,17 +1908,20 @@ static int init_dma_desc_rings(struct ne
/**
* dma_free_tx_skbufs - free TX dma buffers
* @priv: private structure
@@ -533,7 +533,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (tx_q->xsk_pool && tx_q->xsk_frames_done) {
xsk_tx_completed(tx_q->xsk_pool, tx_q->xsk_frames_done);
@@ -1896,34 +1939,37 @@ static void stmmac_free_tx_skbufs(struct
@@ -1897,34 +1940,37 @@ static void stmmac_free_tx_skbufs(struct
u32 queue;
for (queue = 0; queue < tx_queue_cnt; queue++)
@@ -578,7 +578,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_extended_desc),
rx_q->dma_erx, rx_q->dma_rx_phy);
@@ -1935,29 +1981,33 @@ static void __free_dma_rx_desc_resources
@@ -1936,29 +1982,33 @@ static void __free_dma_rx_desc_resources
page_pool_destroy(rx_q->page_pool);
}
@@ -617,7 +617,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->extend_desc) {
size = sizeof(struct dma_extended_desc);
@@ -1970,7 +2020,7 @@ static void __free_dma_tx_desc_resources
@@ -1971,7 +2021,7 @@ static void __free_dma_tx_desc_resources
addr = tx_q->dma_tx;
}
@@ -626,7 +626,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(priv->device, size, addr, tx_q->dma_tx_phy);
@@ -1978,28 +2028,32 @@ static void __free_dma_tx_desc_resources
@@ -1979,28 +2029,32 @@ static void __free_dma_tx_desc_resources
kfree(tx_q->tx_skbuff);
}
@@ -663,7 +663,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
bool xdp_prog = stmmac_xdp_is_enabled(priv);
struct page_pool_params pp_params = { 0 };
@@ -2011,8 +2065,8 @@ static int __alloc_dma_rx_desc_resources
@@ -2012,8 +2066,8 @@ static int __alloc_dma_rx_desc_resources
rx_q->priv_data = priv;
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
@@ -674,7 +674,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pp_params.order = ilog2(num_pages);
pp_params.nid = dev_to_node(priv->device);
pp_params.dev = priv->device;
@@ -2027,7 +2081,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2028,7 +2082,7 @@ static int __alloc_dma_rx_desc_resources
return ret;
}
@@ -683,7 +683,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(*rx_q->buf_pool),
GFP_KERNEL);
if (!rx_q->buf_pool)
@@ -2035,7 +2089,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2036,7 +2090,7 @@ static int __alloc_dma_rx_desc_resources
if (priv->extend_desc) {
rx_q->dma_erx = dma_alloc_coherent(priv->device,
@@ -692,7 +692,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_extended_desc),
&rx_q->dma_rx_phy,
GFP_KERNEL);
@@ -2044,7 +2098,7 @@ static int __alloc_dma_rx_desc_resources
@@ -2045,7 +2099,7 @@ static int __alloc_dma_rx_desc_resources
} else {
rx_q->dma_rx = dma_alloc_coherent(priv->device,
@@ -701,7 +701,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct dma_desc),
&rx_q->dma_rx_phy,
GFP_KERNEL);
@@ -2069,7 +2123,8 @@ static int __alloc_dma_rx_desc_resources
@@ -2070,7 +2124,8 @@ static int __alloc_dma_rx_desc_resources
return 0;
}
@@ -711,7 +711,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
u32 rx_count = priv->plat->rx_queues_to_use;
u32 queue;
@@ -2077,7 +2132,7 @@ static int alloc_dma_rx_desc_resources(s
@@ -2078,7 +2133,7 @@ static int alloc_dma_rx_desc_resources(s
/* RX queues buffers and DMA */
for (queue = 0; queue < rx_count; queue++) {
@@ -720,7 +720,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret)
goto err_dma;
}
@@ -2085,7 +2140,7 @@ static int alloc_dma_rx_desc_resources(s
@@ -2086,7 +2141,7 @@ static int alloc_dma_rx_desc_resources(s
return 0;
err_dma:
@@ -729,7 +729,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return ret;
}
@@ -2093,28 +2148,31 @@ err_dma:
@@ -2094,28 +2149,31 @@ err_dma:
/**
* __alloc_dma_tx_desc_resources - alloc TX resources (per queue).
* @priv: private structure
@@ -765,7 +765,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
sizeof(struct sk_buff *),
GFP_KERNEL);
if (!tx_q->tx_skbuff)
@@ -2127,7 +2185,7 @@ static int __alloc_dma_tx_desc_resources
@@ -2128,7 +2186,7 @@ static int __alloc_dma_tx_desc_resources
else
size = sizeof(struct dma_desc);
@@ -774,7 +774,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
addr = dma_alloc_coherent(priv->device, size,
&tx_q->dma_tx_phy, GFP_KERNEL);
@@ -2144,7 +2202,8 @@ static int __alloc_dma_tx_desc_resources
@@ -2145,7 +2203,8 @@ static int __alloc_dma_tx_desc_resources
return 0;
}
@@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
{
u32 tx_count = priv->plat->tx_queues_to_use;
u32 queue;
@@ -2152,7 +2211,7 @@ static int alloc_dma_tx_desc_resources(s
@@ -2153,7 +2212,7 @@ static int alloc_dma_tx_desc_resources(s
/* TX queues buffers and DMA */
for (queue = 0; queue < tx_count; queue++) {
@@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret)
goto err_dma;
}
@@ -2160,27 +2219,29 @@ static int alloc_dma_tx_desc_resources(s
@@ -2161,27 +2220,29 @@ static int alloc_dma_tx_desc_resources(s
return 0;
err_dma:
@@ -827,7 +827,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return ret;
}
@@ -2188,16 +2249,18 @@ static int alloc_dma_desc_resources(stru
@@ -2189,16 +2250,18 @@ static int alloc_dma_desc_resources(stru
/**
* free_dma_desc_resources - free dma desc resources
* @priv: private structure
@@ -849,7 +849,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
/**
@@ -2686,8 +2749,8 @@ static void stmmac_tx_err(struct stmmac_
@@ -2687,8 +2750,8 @@ static void stmmac_tx_err(struct stmmac_
netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));
stmmac_stop_tx_dma(priv, chan);
@@ -860,7 +860,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_reset_tx_queue(priv, chan);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -3684,19 +3747,93 @@ static int stmmac_request_irq(struct net
@@ -3685,19 +3748,93 @@ static int stmmac_request_irq(struct net
}
/**
@@ -957,7 +957,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
u32 chan;
int ret;
@@ -3723,45 +3860,10 @@ static int stmmac_open(struct net_device
@@ -3724,45 +3861,10 @@ static int stmmac_open(struct net_device
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
priv->xstats.threshold = tc;
@@ -1005,7 +1005,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->plat->serdes_powerup) {
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
@@ -3804,14 +3906,28 @@ irq_error:
@@ -3805,14 +3907,28 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
{
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
@@ -3858,7 +3974,7 @@ static int stmmac_release(struct net_dev
@@ -3859,7 +3975,7 @@ static int stmmac_release(struct net_dev
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6403,7 +6519,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6402,7 +6518,7 @@ void stmmac_disable_rx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
@@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6414,21 +6530,21 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6413,21 +6529,21 @@ void stmmac_enable_rx_queue(struct stmma
u32 buf_size;
int ret;
@@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, rx_q->queue_index);
@@ -6466,7 +6582,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6465,7 +6581,7 @@ void stmmac_disable_tx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
@@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6476,21 +6592,21 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6475,21 +6591,21 @@ void stmmac_enable_tx_queue(struct stmma
unsigned long flags;
int ret;
@@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, tx_q->queue_index);
@@ -6530,7 +6646,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6529,7 +6645,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6555,14 +6671,14 @@ int stmmac_xdp_open(struct net_device *d
@@ -6554,14 +6670,14 @@ int stmmac_xdp_open(struct net_device *d
u32 chan;
int ret;
@@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret < 0) {
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
__func__);
@@ -6644,7 +6760,7 @@ irq_error:
@@ -6643,7 +6759,7 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_desc_error:
return ret;
}
@@ -7509,7 +7625,7 @@ int stmmac_resume(struct device *dev)
@@ -7506,7 +7622,7 @@ int stmmac_resume(struct device *dev)
stmmac_reset_queues_param(priv);
stmmac_free_tx_skbufs(priv);

Some files were not shown because too many files have changed in this diff Show More