kernel: bump 5.15 to 5.15.132

Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.132

Removed upstreamed:
	bcm53xx/patches-5.15/037-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[1]
	bcm53xx/patches-5.15/037-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[2]
	bcm53xx/patches-5.15/037-v6.6-0008-ARM-dts-BCM5301X-Extend-RAM-to-full-256MB-for-Linksy.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=b35f3ca1877e024887df205ede952863d65dad36
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=2840d9b9c8750be270fb1153ccd5b983cbb5d592
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=f086e859ddc252c32f0438edff241859c0f022ce

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit ac422c9788fbb3510b1fddaefc8816bea6601479)
[Refresh on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
John Audia 2023-09-19 15:04:14 -04:00 committed by Hauke Mehrtens
parent 442f7406a9
commit dee4e7b40c
115 changed files with 331 additions and 446 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .131 LINUX_VERSION-5.15 = .132
LINUX_KERNEL_HASH-5.15.131 = 997c3391f439fb6fe32f1938fe089a046b840a5cde9a2215b6745144f8b24c69 LINUX_KERNEL_HASH-5.15.132 = 4177b5c4d6e749bb8339ac4aa68eb0932ead9490b956a80d9a597089959618ac

View File

@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -3107,6 +3107,7 @@ int spi_nor_scan(struct spi_nor *nor, co @@ -3108,6 +3108,7 @@ int spi_nor_scan(struct spi_nor *nor, co
struct device *dev = nor->dev; struct device *dev = nor->dev;
struct mtd_info *mtd = &nor->mtd; struct mtd_info *mtd = &nor->mtd;
struct device_node *np = spi_nor_get_flash_node(nor); struct device_node *np = spi_nor_get_flash_node(nor);
@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
int ret; int ret;
int i; int i;
@@ -3161,7 +3162,12 @@ int spi_nor_scan(struct spi_nor *nor, co @@ -3162,7 +3163,12 @@ int spi_nor_scan(struct spi_nor *nor, co
if (ret) if (ret)
return ret; return ret;

View File

@ -750,7 +750,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -4158,14 +4158,16 @@ static bool tcp_parse_aligned_timestamp( @@ -4157,14 +4157,16 @@ static bool tcp_parse_aligned_timestamp(
{ {
const __be32 *ptr = (const __be32 *)(th + 1); const __be32 *ptr = (const __be32 *)(th + 1);

View File

@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
} }
--- a/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c
@@ -5584,7 +5584,7 @@ static void port_event(struct usb_hub *h @@ -5640,7 +5640,7 @@ static void port_event(struct usb_hub *h
port_dev->over_current_count++; port_dev->over_current_count++;
port_over_current_notify(port_dev); port_over_current_notify(port_dev);
@ -1134,7 +1134,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
USB_PORT_FEAT_C_OVER_CURRENT); USB_PORT_FEAT_C_OVER_CURRENT);
--- a/drivers/usb/core/message.c --- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c
@@ -2140,6 +2140,85 @@ free_interfaces: @@ -2135,6 +2135,85 @@ free_interfaces:
if (cp->string == NULL && if (cp->string == NULL &&
!(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS)) !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
cp->string = usb_cache_string(dev, cp->desc.iConfiguration); cp->string = usb_cache_string(dev, cp->desc.iConfiguration);

View File

@ -187,7 +187,7 @@ Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
select DMA_ENGINE select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS select DMA_VIRTUAL_CHANNELS
@@ -683,6 +683,10 @@ config UNIPHIER_XDMAC @@ -685,6 +685,10 @@ config UNIPHIER_XDMAC
UniPhier platform. This DMA controller can transfer data from UniPhier platform. This DMA controller can transfer data from
memory to memory, memory to peripheral and peripheral to memory. memory to memory, memory to peripheral and peripheral to memory.

View File

@ -14186,7 +14186,7 @@ Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
config SND_SOC_RT5631 config SND_SOC_RT5631
tristate "Realtek ALC5631/RT5631 CODEC" tristate "Realtek ALC5631/RT5631 CODEC"
depends on I2C depends on I2C
@@ -1437,6 +1452,9 @@ config SND_SOC_TFA9879 @@ -1438,6 +1453,9 @@ config SND_SOC_TFA9879
tristate "NXP Semiconductors TFA9879 amplifier" tristate "NXP Semiconductors TFA9879 amplifier"
depends on I2C depends on I2C
@ -14196,7 +14196,7 @@ Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
config SND_SOC_TFA989X config SND_SOC_TFA989X
tristate "NXP/Goodix TFA989X (TFA1) amplifiers" tristate "NXP/Goodix TFA989X (TFA1) amplifiers"
depends on I2C depends on I2C
@@ -1943,4 +1961,8 @@ config SND_SOC_LPASS_TX_MACRO @@ -1944,4 +1962,8 @@ config SND_SOC_LPASS_TX_MACRO
select REGMAP_MMIO select REGMAP_MMIO
tristate "Qualcomm TX Macro in LPASS(Low Power Audio SubSystem)" tristate "Qualcomm TX Macro in LPASS(Low Power Audio SubSystem)"

View File

@ -130,9 +130,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
static void iproc_rng200_cleanup(struct hwrng *rng) static void iproc_rng200_cleanup(struct hwrng *rng)
{ {
struct iproc_rng200_dev *priv = to_rng_priv(rng); struct iproc_rng200_dev *priv = to_rng_priv(rng);
@@ -189,11 +255,17 @@ static int iproc_rng200_probe(struct pla @@ -191,11 +257,17 @@ static int iproc_rng200_probe(struct pla
return PTR_ERR(priv->base);
} dev_set_drvdata(dev, priv);
- priv->rng.name = "iproc-rng200"; - priv->rng.name = "iproc-rng200";
- priv->rng.read = iproc_rng200_read; - priv->rng.read = iproc_rng200_read;

View File

@ -27,7 +27,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
--- a/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c
@@ -1972,6 +1972,16 @@ reset: @@ -1976,6 +1976,16 @@ reset:
return ret; return ret;
} }
@ -46,7 +46,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
* have been called previously. Use for set_configuration, set_interface, * have been called previously. Use for set_configuration, set_interface,
--- a/drivers/usb/core/message.c --- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c
@@ -1268,6 +1268,21 @@ static void remove_intf_ep_devs(struct u @@ -1263,6 +1263,21 @@ static void remove_intf_ep_devs(struct u
intf->ep_devs_created = 0; intf->ep_devs_created = 0;
} }

View File

@ -118,7 +118,7 @@ Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
- MEDIA_BUS_FMT_RGB666_1X24_CPADHI - MEDIA_BUS_FMT_RGB666_1X24_CPADHI
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2473,6 +2473,38 @@ static const struct panel_desc innolux_a @@ -2475,6 +2475,38 @@ static const struct panel_desc innolux_a
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE, .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
}; };
@ -157,7 +157,7 @@ Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
static const struct drm_display_mode innolux_at070tn92_mode = { static const struct drm_display_mode innolux_at070tn92_mode = {
.clock = 33333, .clock = 33333,
.hdisplay = 800, .hdisplay = 800,
@@ -4664,6 +4696,9 @@ static const struct of_device_id platfor @@ -4666,6 +4698,9 @@ static const struct of_device_id platfor
.compatible = "innolux,at043tn24", .compatible = "innolux,at043tn24",
.data = &innolux_at043tn24, .data = &innolux_at043tn24,
}, { }, {

View File

@ -15,7 +15,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3763,6 +3763,31 @@ static const struct panel_desc qishenglo @@ -3765,6 +3765,31 @@ static const struct panel_desc qishenglo
.connector_type = DRM_MODE_CONNECTOR_DPI, .connector_type = DRM_MODE_CONNECTOR_DPI,
}; };
@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct display_timing rocktech_rk070er9427_timing = { static const struct display_timing rocktech_rk070er9427_timing = {
.pixelclock = { 26400000, 33300000, 46800000 }, .pixelclock = { 26400000, 33300000, 46800000 },
.hactive = { 800, 800, 800 }, .hactive = { 800, 800, 800 },
@@ -4843,6 +4868,9 @@ static const struct of_device_id platfor @@ -4845,6 +4870,9 @@ static const struct of_device_id platfor
.compatible = "qishenglong,gopher2b-lcd", .compatible = "qishenglong,gopher2b-lcd",
.data = &qishenglong_gopher2b_lcd, .data = &qishenglong_gopher2b_lcd,
}, { }, {

View File

@ -13,7 +13,7 @@ Acked-by: Maxime Ripard <maxime@cerno.tech>
--- a/drivers/gpu/drm/panel/panel-simple.c --- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2321,6 +2321,32 @@ static const struct panel_desc friendlya @@ -2323,6 +2323,32 @@ static const struct panel_desc friendlya
}, },
}; };
@ -46,7 +46,7 @@ Acked-by: Maxime Ripard <maxime@cerno.tech>
static const struct drm_display_mode giantplus_gpg482739qs5_mode = { static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
.clock = 9000, .clock = 9000,
.hdisplay = 480, .hdisplay = 480,
@@ -4706,6 +4732,9 @@ static const struct of_device_id platfor @@ -4708,6 +4734,9 @@ static const struct of_device_id platfor
.compatible = "friendlyarm,hd702e", .compatible = "friendlyarm,hd702e",
.data = &friendlyarm_hd702e, .data = &friendlyarm_hd702e,
}, { }, {

View File

@ -27,7 +27,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+CONFIG_CLK_KUNIT_TEST=y +CONFIG_CLK_KUNIT_TEST=y
--- a/drivers/clk/Kconfig --- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig
@@ -427,4 +427,12 @@ source "drivers/clk/x86/Kconfig" @@ -428,4 +428,12 @@ source "drivers/clk/x86/Kconfig"
source "drivers/clk/xilinx/Kconfig" source "drivers/clk/xilinx/Kconfig"
source "drivers/clk/zynqmp/Kconfig" source "drivers/clk/zynqmp/Kconfig"

View File

@ -15,7 +15,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/drivers/char/hw_random/iproc-rng200.c --- a/drivers/char/hw_random/iproc-rng200.c
+++ b/drivers/char/hw_random/iproc-rng200.c +++ b/drivers/char/hw_random/iproc-rng200.c
@@ -257,6 +257,7 @@ static int iproc_rng200_probe(struct pla @@ -259,6 +259,7 @@ static int iproc_rng200_probe(struct pla
priv->rng.name = pdev->name; priv->rng.name = pdev->name;
priv->rng.cleanup = iproc_rng200_cleanup; priv->rng.cleanup = iproc_rng200_cleanup;

View File

@ -14,7 +14,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -2998,6 +2998,7 @@ int brcmnand_probe(struct platform_devic @@ -3033,6 +3033,7 @@ int brcmnand_probe(struct platform_devic
dev_set_drvdata(dev, ctrl); dev_set_drvdata(dev, ctrl);
ctrl->dev = dev; ctrl->dev = dev;
@ -22,7 +22,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
init_completion(&ctrl->done); init_completion(&ctrl->done);
init_completion(&ctrl->dma_done); init_completion(&ctrl->dma_done);
@@ -3138,8 +3139,6 @@ int brcmnand_probe(struct platform_devic @@ -3173,8 +3174,6 @@ int brcmnand_probe(struct platform_devic
* interesting ways * interesting ways
*/ */
if (soc) { if (soc) {

View File

@ -84,7 +84,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
} }
static inline void edu_writel(struct brcmnand_controller *ctrl, static inline void edu_writel(struct brcmnand_controller *ctrl,
@@ -3000,6 +3018,12 @@ int brcmnand_probe(struct platform_devic @@ -3035,6 +3053,12 @@ int brcmnand_probe(struct platform_devic
ctrl->dev = dev; ctrl->dev = dev;
ctrl->soc = soc; ctrl->soc = soc;

View File

@ -16,7 +16,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -2771,7 +2771,7 @@ static const struct nand_controller_ops @@ -2806,7 +2806,7 @@ static const struct nand_controller_ops
static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn) static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
{ {
struct brcmnand_controller *ctrl = host->ctrl; struct brcmnand_controller *ctrl = host->ctrl;
@ -25,7 +25,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
struct mtd_info *mtd; struct mtd_info *mtd;
struct nand_chip *chip; struct nand_chip *chip;
int ret; int ret;
@@ -2779,7 +2779,7 @@ static int brcmnand_init_cs(struct brcmn @@ -2814,7 +2814,7 @@ static int brcmnand_init_cs(struct brcmn
ret = of_property_read_u32(dn, "reg", &host->cs); ret = of_property_read_u32(dn, "reg", &host->cs);
if (ret) { if (ret) {
@ -34,7 +34,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
return -ENXIO; return -ENXIO;
} }
@@ -2788,13 +2788,13 @@ static int brcmnand_init_cs(struct brcmn @@ -2823,13 +2823,13 @@ static int brcmnand_init_cs(struct brcmn
nand_set_flash_node(chip, dn); nand_set_flash_node(chip, dn);
nand_set_controller_data(chip, host); nand_set_controller_data(chip, host);

View File

@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -2768,7 +2768,7 @@ static const struct nand_controller_ops @@ -2803,7 +2803,7 @@ static const struct nand_controller_ops
.attach_chip = brcmnand_attach_chip, .attach_chip = brcmnand_attach_chip,
}; };
@ -26,7 +26,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
{ {
struct brcmnand_controller *ctrl = host->ctrl; struct brcmnand_controller *ctrl = host->ctrl;
struct device *dev = ctrl->dev; struct device *dev = ctrl->dev;
@@ -2777,16 +2777,9 @@ static int brcmnand_init_cs(struct brcmn @@ -2812,16 +2812,9 @@ static int brcmnand_init_cs(struct brcmn
int ret; int ret;
u16 cfg_offs; u16 cfg_offs;
@ -43,7 +43,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
nand_set_controller_data(chip, host); nand_set_controller_data(chip, host);
mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d", mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d",
host->cs); host->cs);
@@ -3193,7 +3186,16 @@ int brcmnand_probe(struct platform_devic @@ -3228,7 +3221,16 @@ int brcmnand_probe(struct platform_devic
host->pdev = pdev; host->pdev = pdev;
host->ctrl = ctrl; host->ctrl = ctrl;

View File

@ -23,7 +23,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
unsigned int dma_irq; unsigned int dma_irq;
int nand_version; int nand_version;
@@ -1610,7 +1610,7 @@ static bool brcmstb_nand_wait_for_comple @@ -1642,7 +1642,7 @@ static bool brcmstb_nand_wait_for_comple
bool err = false; bool err = false;
int sts; int sts;
@ -32,7 +32,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
/* switch to interrupt polling and PIO mode */ /* switch to interrupt polling and PIO mode */
disable_ctrl_irqs(ctrl); disable_ctrl_irqs(ctrl);
sts = bcmnand_ctrl_poll_status(ctrl, NAND_CTRL_RDY, sts = bcmnand_ctrl_poll_status(ctrl, NAND_CTRL_RDY,
@@ -3144,33 +3144,29 @@ int brcmnand_probe(struct platform_devic @@ -3179,33 +3179,29 @@ int brcmnand_probe(struct platform_devic
} }
/* IRQ */ /* IRQ */

View File

@ -23,7 +23,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
#include <linux/err.h> #include <linux/err.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
@@ -2768,7 +2769,8 @@ static const struct nand_controller_ops @@ -2803,7 +2804,8 @@ static const struct nand_controller_ops
.attach_chip = brcmnand_attach_chip, .attach_chip = brcmnand_attach_chip,
}; };
@ -33,7 +33,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
{ {
struct brcmnand_controller *ctrl = host->ctrl; struct brcmnand_controller *ctrl = host->ctrl;
struct device *dev = ctrl->dev; struct device *dev = ctrl->dev;
@@ -2821,7 +2823,7 @@ static int brcmnand_init_cs(struct brcmn @@ -2856,7 +2858,7 @@ static int brcmnand_init_cs(struct brcmn
if (ret) if (ret)
return ret; return ret;
@ -42,7 +42,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
if (ret) if (ret)
nand_cleanup(chip); nand_cleanup(chip);
@@ -2990,17 +2992,15 @@ static int brcmnand_edu_setup(struct pla @@ -3025,17 +3027,15 @@ static int brcmnand_edu_setup(struct pla
int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
{ {
@ -63,7 +63,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
return -ENODEV; return -ENODEV;
ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL); ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
@@ -3027,7 +3027,7 @@ int brcmnand_probe(struct platform_devic @@ -3062,7 +3062,7 @@ int brcmnand_probe(struct platform_devic
/* NAND register range */ /* NAND register range */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ctrl->nand_base = devm_ioremap_resource(dev, res); ctrl->nand_base = devm_ioremap_resource(dev, res);
@ -72,7 +72,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
return PTR_ERR(ctrl->nand_base); return PTR_ERR(ctrl->nand_base);
/* Enable clock before using NAND registers */ /* Enable clock before using NAND registers */
@@ -3171,7 +3171,6 @@ int brcmnand_probe(struct platform_devic @@ -3206,7 +3206,6 @@ int brcmnand_probe(struct platform_devic
for_each_available_child_of_node(dn, child) { for_each_available_child_of_node(dn, child) {
if (of_device_is_compatible(child, "brcm,nandcs")) { if (of_device_is_compatible(child, "brcm,nandcs")) {
@ -80,7 +80,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL); host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
if (!host) { if (!host) {
@@ -3191,7 +3190,7 @@ int brcmnand_probe(struct platform_devic @@ -3226,7 +3225,7 @@ int brcmnand_probe(struct platform_devic
nand_set_flash_node(&host->chip, child); nand_set_flash_node(&host->chip, child);
@ -89,7 +89,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
if (ret) { if (ret) {
devm_kfree(dev, host); devm_kfree(dev, host);
continue; /* Try all chip-selects */ continue; /* Try all chip-selects */
@@ -3201,6 +3200,32 @@ int brcmnand_probe(struct platform_devic @@ -3236,6 +3235,32 @@ int brcmnand_probe(struct platform_devic
} }
} }

View File

@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm53573.dtsi --- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi +++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -180,6 +180,24 @@ @@ -183,6 +183,24 @@
gmac0: ethernet@5000 { gmac0: ethernet@5000 {
reg = <0x5000 0x1000>; reg = <0x5000 0x1000>;

View File

@ -213,7 +213,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
--- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts --- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
+++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts +++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
@@ -25,13 +25,13 @@ @@ -26,13 +26,13 @@
gpio-keys { gpio-keys {
compatible = "gpio-keys"; compatible = "gpio-keys";

View File

@ -21,7 +21,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
--- a/arch/arm/boot/dts/bcm53573.dtsi --- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi +++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -156,8 +156,6 @@ @@ -159,8 +159,6 @@
}; };
ohci: usb@d000 { ohci: usb@d000 {

View File

@ -1,37 +0,0 @@
From 3392ef368d9b04622fe758b1079b512664b6110a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 7 Jul 2023 13:40:03 +0200
Subject: [PATCH] ARM: dts: BCM53573: Add cells sizes to PCIe node
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes:
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: pcie@2000: '#address-cells' is a required property
From schema: /lib/python3.10/site-packages/dtschema/schemas/pci/pci-bus.yaml
arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dtb: pcie@2000: '#size-cells' is a required property
From schema: /lib/python3.10/site-packages/dtschema/schemas/pci/pci-bus.yaml
Two properties that need to be added later are "device_type" and
"ranges". Adding "device_type" on its own causes a new warning and the
value of "ranges" needs to be determined yet.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-3-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm53573.dtsi | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -127,6 +127,9 @@
pcie0: pcie@2000 {
reg = <0x00002000 0x1000>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
};
usb2: usb2@4000 {

View File

@ -1,44 +0,0 @@
From 2c0fd6b3d0778ceab40205315ccef74568490f17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 7 Jul 2023 13:40:04 +0200
Subject: [PATCH] ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Switch away from deprecated properties.
This fixes:
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-sck: False schema does not allow [[3, 21, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-miso: False schema does not allow [[3, 22, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: gpio-mosi: False schema does not allow [[3, 23, 0]]
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: 'sck-gpios' is a required property
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dtb: spi: Unevaluated properties are not allowed ('gpio-miso', 'gpio-mosi', 'gpio-sck' were unexpected)
From schema: Documentation/devicetree/bindings/spi/spi-gpio.yaml
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230707114004.2740-4-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/arm/boot/dts/bcm947189acdbmr.dts
+++ b/arch/arm/boot/dts/bcm947189acdbmr.dts
@@ -60,9 +60,9 @@
spi {
compatible = "spi-gpio";
num-chipselects = <1>;
- gpio-sck = <&chipcommon 21 0>;
- gpio-miso = <&chipcommon 22 0>;
- gpio-mosi = <&chipcommon 23 0>;
+ sck-gpios = <&chipcommon 21 0>;
+ miso-gpios = <&chipcommon 22 0>;
+ mosi-gpios = <&chipcommon 23 0>;
cs-gpios = <&chipcommon 24 0>;
#address-cells = <1>;
#size-cells = <0>;

View File

@ -1,34 +0,0 @@
From: Aleksey Nasibulin <alealexpro100@ya.ru>
Date: Wed, 12 Jul 2023 03:40:17 +0200
Subject: [PATCH] ARM: dts: BCM5301X: Extend RAM to full 256MB for Linksys
EA6500 V2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Linksys ea6500-v2 have 256MB of ram. Currently we only use 128MB.
Expand the definition to use all the available RAM.
Fixes: 03e96644d7a8 ("ARM: dts: BCM5301X: Add basic DT for Linksys EA6500 V2")
Signed-off-by: Aleksey Nasibulin <alealexpro100@ya.ru>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230712014017.28123-1-ansuelsmth@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
+++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts
@@ -19,7 +19,8 @@
memory@0 {
device_type = "memory";
- reg = <0x00000000 0x08000000>;
+ reg = <0x00000000 0x08000000>,
+ <0x88000000 0x08000000>;
};
gpio-keys {

View File

@ -37,7 +37,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
@@ -45,3 +45,16 @@ @@ -58,3 +58,16 @@
}; };
}; };
}; };
@ -56,7 +56,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+}; +};
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
@@ -81,3 +81,16 @@ @@ -94,3 +94,16 @@
}; };
}; };
}; };

View File

@ -19,7 +19,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
@@ -60,3 +60,7 @@ @@ -73,3 +73,7 @@
}; };
}; };
}; };
@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+}; +};
--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts --- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
+++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
@@ -96,3 +96,7 @@ @@ -109,3 +109,7 @@
}; };
}; };
}; };

View File

@ -110,7 +110,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/include/linux/memcontrol.h --- a/include/linux/memcontrol.h
+++ b/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 * - LRU isolation
* - lock_page_memcg() * - lock_page_memcg()
* - exclusive reference * - 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 * For a kmem page a caller should hold an rcu read lock to protect memcg
* associated with a kmem page from being released. * 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 * - LRU isolation
* - lock_page_memcg() * - lock_page_memcg()
* - exclusive reference * - 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 * For a kmem page a caller should hold an rcu read lock to protect memcg
* associated with a kmem page from being released. * 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); 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 */ /* idx can be of type enum memcg_stat_item or node_stat_item */
static inline void mod_memcg_state(struct mem_cgroup *memcg, static inline void mod_memcg_state(struct mem_cgroup *memcg,
int idx, int val) 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); BUG_ON(active_mm != old_mm);
--- a/include/linux/memcontrol.h --- a/include/linux/memcontrol.h
+++ b/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; struct deferred_split deferred_split_queue;
#endif #endif

View File

@ -69,7 +69,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
--- a/include/linux/memcontrol.h --- a/include/linux/memcontrol.h
+++ b/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); 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) static inline void mem_cgroup_put(struct mem_cgroup *memcg)
{ {
if (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; return NULL;
} }

View File

@ -22,7 +22,7 @@ Link: https://lore.kernel.org/bpf/54f9fd3bb65d190daf2c0bbae2f852ff16cfbaa0.16469
--- a/drivers/net/veth.c --- a/drivers/net/veth.c
+++ b/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]; struct xdp_frame *frame = frames[i];
void *ptr = veth_xdp_to_ptr(frame); void *ptr = veth_xdp_to_ptr(frame);
@ -31,7 +31,7 @@ Link: https://lore.kernel.org/bpf/54f9fd3bb65d190daf2c0bbae2f852ff16cfbaa0.16469
__ptr_ring_produce(&rq->xdp_ring, ptr))) __ptr_ring_produce(&rq->xdp_ring, ptr)))
break; break;
nxmit++; 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 */ /* ndo_xdp_xmit */
struct xdp_frame *frame = veth_ptr_to_xdp(ptr); struct xdp_frame *frame = veth_ptr_to_xdp(ptr);

View File

@ -20,7 +20,7 @@ Link: https://lore.kernel.org/bpf/d5dc039c3d4123426e7023a488c449181a7bc57f.16469
--- a/drivers/net/veth.c --- a/drivers/net/veth.c
+++ b/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; goto err;
} }

View File

@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_size * sizeof(*ring->dma), ring->dma_size * sizeof(*ring->dma),
ring->dma, ring->dma,
ring->phys); 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]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma), MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring, eth->scratch_ring,
eth->phy_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) 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; int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state)) 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) if (ret)
goto err_disable_pm; 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)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev); ret = device_reset(eth->dev);
if (ret) { if (ret) {
@@ -3072,6 +3079,35 @@ free_netdev: @@ -3075,6 +3082,35 @@ free_netdev:
return err; return err;
} }
@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
struct device_node *mac_np; struct device_node *mac_np;
@@ -3085,6 +3121,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->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &pdev->dev; eth->dev = &pdev->dev;
@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
eth->base = devm_platform_ioremap_resource(pdev, 0); eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_ERR(eth->base); return PTR_ERR(eth->base);
@@ -3133,6 +3170,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; static int mtk_msg_level = -1;
module_param_named(msg_level, mtk_msg_level, int, 0); module_param_named(msg_level, mtk_msg_level, int, 0);
@@ -3202,6 +3203,22 @@ static int mtk_probe(struct platform_dev @@ -3205,6 +3206,22 @@ static int mtk_probe(struct platform_dev
} }
} }

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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; return err;
} }
@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
gdm_config = MTK_GDMA_TO_PPE; gdm_config = MTK_GDMA_TO_PPE;
mtk_gdm_config(eth, gdm_config); 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); mtk_dma_free(eth);
if (eth->soc->offload_version) if (eth->soc->offload_version)
@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3294,10 +3294,11 @@ static int mtk_probe(struct platform_dev @@ -3297,10 +3297,11 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { 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 && if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG)) (trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
@@ -3294,7 +3300,7 @@ static int mtk_probe(struct platform_dev @@ -3297,7 +3303,7 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

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

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); 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) static void mtk_dma_free(struct mtk_eth *eth)
{ {
@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; 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]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->scratch_ring = NULL; eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0; eth->phy_scratch_ring = 0;
} }
@@ -3384,6 +3387,9 @@ static const struct mtk_soc_data mt2701_ @@ -3387,6 +3390,9 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7621_data = { static const struct mtk_soc_data mt7621_data = {
@@ -3392,6 +3398,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_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7622_data = { static const struct mtk_soc_data mt7622_data = {
@@ -3401,6 +3410,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_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7623_data = { static const struct mtk_soc_data mt7623_data = {
@@ -3409,6 +3421,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_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7629_data = { static const struct mtk_soc_data mt7629_data = {
@@ -3417,6 +3432,9 @@ static const struct mtk_soc_data mt7629_ @@ -3420,6 +3435,9 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {
@@ -3424,6 +3442,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, .hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->dma = NULL; ring->dma = NULL;
} }
} }
@@ -3399,6 +3398,7 @@ static const struct mtk_soc_data mt2701_ @@ -3402,6 +3401,7 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true, .required_pctl = true,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3410,6 +3410,7 @@ static const struct mtk_soc_data mt7621_ @@ -3413,6 +3413,7 @@ static const struct mtk_soc_data mt7621_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3422,6 +3423,7 @@ static const struct mtk_soc_data mt7622_ @@ -3425,6 +3426,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3433,6 +3435,7 @@ static const struct mtk_soc_data mt7623_ @@ -3436,6 +3438,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3444,6 +3447,7 @@ static const struct mtk_soc_data mt7629_ @@ -3447,6 +3450,7 @@ static const struct mtk_soc_data mt7629_
.required_pctl = false, .required_pctl = false,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3454,6 +3458,7 @@ static const struct mtk_soc_data rt5350_ @@ -3457,6 +3461,7 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false, .required_pctl = false,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),

View File

@ -345,7 +345,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; 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; u32 val;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) 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, ret = readx_poll_timeout_atomic(__raw_readl, eth->base + reg, val,
!(val & (MTK_RX_DMA_BUSY | MTK_TX_DMA_BUSY)), !(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 * automatically
*/ */
mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN | 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; 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) static irqreturn_t mtk_handle_irq(int irq, void *_eth)
{ {
struct mtk_eth *eth = _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); 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) static int mtk_start_dma(struct mtk_eth *eth)
{ {
u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0; 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; int err;
err = mtk_dma_init(eth); 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_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_DMA_EN | MTK_RX_2B_OFFSET | MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
MTK_RX_BT_32DWORDS, MTK_RX_BT_32DWORDS,
@ -415,7 +415,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
return 0; 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); cancel_work_sync(&eth->tx_dim.work);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) 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); 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 dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim); 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; struct dim_cq_moder cur_profile;
u32 val, cur; 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); dim->profile_ix);
spin_lock_bh(&eth->dim_lock); 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_TX_MASK;
val |= MTK_PDMA_DELAY_RX_EN; 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); cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT; 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); 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 dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim); 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; struct dim_cq_moder cur_profile;
u32 val, cur; 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); dim->profile_ix);
spin_lock_bh(&eth->dim_lock); 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_RX_MASK;
val |= MTK_PDMA_DELAY_TX_EN; 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); cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT; 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); 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 | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE; ETHSYS_DMA_AG_MAP_PPE;
@ -492,7 +492,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i, val, ret; int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state)) 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); mtk_rx_irq_disable(eth, ~0);
/* FE int grouping */ /* FE int grouping */
@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
return 0; return 0;
@@ -3164,14 +3227,6 @@ static int mtk_probe(struct platform_dev @@ -3167,14 +3230,6 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_ERR(eth->base); return PTR_ERR(eth->base);
@ -522,7 +522,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA; eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth->ip_align = NET_IP_ALIGN; eth->ip_align = NET_IP_ALIGN;
@@ -3405,6 +3460,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 = { static const struct mtk_soc_data mt2701_data = {
@ -530,7 +530,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7623_CAPS | MTK_HWLRO, .caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
@@ -3416,6 +3472,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 = { static const struct mtk_soc_data mt7621_data = {
@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7621_CAPS, .caps = MT7621_CAPS,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
@@ -3428,6 +3485,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 = { static const struct mtk_soc_data mt7622_data = {
@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x2028, .ana_rgc3 = 0x2028,
.caps = MT7622_CAPS | MTK_HWLRO, .caps = MT7622_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
@@ -3441,6 +3499,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 = { static const struct mtk_soc_data mt7623_data = {
@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7623_CAPS | MTK_HWLRO, .caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
@@ -3453,6 +3512,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 = { static const struct mtk_soc_data mt7629_data = {
@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
.caps = MT7629_CAPS | MTK_HWLRO, .caps = MT7629_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
@@ -3465,6 +3525,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 = { 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; 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++; eth->rx_events++;
if (likely(napi_schedule_prep(&eth->rx_napi))) { if (likely(napi_schedule_prep(&eth->rx_napi))) {
__napi_schedule(&eth->rx_napi); __napi_schedule(&eth->rx_napi);
@ -412,7 +412,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
return IRQ_HANDLED; 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; struct mtk_eth *eth = _eth;
const struct mtk_reg_map *reg_map = eth->soc->reg_map; 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); mtk_handle_irq_rx(irq, _eth);
} }
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) { 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; struct mtk_eth *eth = mac->hw;
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); 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; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int err; 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)) { 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_w32(eth,
MTK_RX_DMA_EN | rx_2b_offset | MTK_RX_DMA_EN | rx_2b_offset |
MTK_RX_BT_32DWORDS | MTK_MULTI_EN, 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->tx_napi);
napi_enable(&eth->rx_napi); napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); 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); refcount_set(&eth->dma_refcnt, 1);
} }
else 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_gdm_config(eth, MTK_GDMA_DROP_ALL);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); 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->tx_napi);
napi_disable(&eth->rx_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; return 0;
} }
@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (eth->pctl) { if (eth->pctl) {
/* Set GE2 driving and slew rate */ /* 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 */ /* FE int grouping */
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp); 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; return 0;
err_disable_pm: err_disable_pm:
@@ -3227,12 +3396,8 @@ static int mtk_probe(struct platform_dev @@ -3230,12 +3399,8 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_ERR(eth->base); return PTR_ERR(eth->base);
@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_lock_init(&eth->page_lock); spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock); spin_lock_init(&eth->tx_irq_lock);
@@ -3468,6 +3633,10 @@ static const struct mtk_soc_data mt2701_ @@ -3471,6 +3636,10 @@ static const struct mtk_soc_data mt2701_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -593,7 +593,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3481,6 +3650,10 @@ static const struct mtk_soc_data mt7621_ @@ -3484,6 +3653,10 @@ static const struct mtk_soc_data mt7621_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -604,7 +604,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3495,6 +3668,10 @@ static const struct mtk_soc_data mt7622_ @@ -3498,6 +3671,10 @@ static const struct mtk_soc_data mt7622_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -615,7 +615,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3508,6 +3685,10 @@ static const struct mtk_soc_data mt7623_ @@ -3511,6 +3688,10 @@ static const struct mtk_soc_data mt7623_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -626,7 +626,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3521,6 +3702,10 @@ static const struct mtk_soc_data mt7629_ @@ -3524,6 +3705,10 @@ static const struct mtk_soc_data mt7629_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3533,6 +3718,10 @@ static const struct mtk_soc_data rt5350_ @@ -3536,6 +3721,10 @@ static const struct mtk_soc_data rt5350_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),

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) void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
@@ -3705,6 +3742,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 = { static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map, .reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS, .caps = MT7628_CAPS,
@@ -3727,6 +3779,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,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
else else
skb_checksum_none_assert(skb); skb_checksum_none_assert(skb);
@@ -3752,6 +3758,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), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
.rx_irq_done_mask = MTK_RX_DONE_INT_V2, .rx_irq_done_mask = MTK_RX_DONE_INT_V2,

View File

@ -726,7 +726,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* to advertise both, only report advertising at 2500BaseX. * to advertise both, only report advertising at 2500BaseX.
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/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; goto empty_set;
} }

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3348,6 +3348,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.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; 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_pcs_get_state = mtk_mac_pcs_get_state,
.mac_an_restart = mtk_mac_an_restart, .mac_an_restart = mtk_mac_an_restart,
.mac_config = mtk_mac_config, .mac_config = mtk_mac_config,
@@ -3310,6 +3262,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.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3262,6 +3262,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.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3561,9 +3561,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); init_dummy_netdev(&eth->dummy_dev);
netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx, 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3257,7 +3257,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 config is not set */
mac->interface = PHY_INTERFACE_MODE_NA; 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 | mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC | MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
MAC_MCR_FORCE_RX_FC); MAC_MCR_FORCE_RX_FC);
@@ -3261,9 +3271,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.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -208,7 +208,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct page_pool *pp; struct page_pool *pp;
pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no, 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; 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) static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
{ {
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
@@ -2988,6 +3105,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; struct mtk_eth *eth = mac->hw;
u32 mcr_cur, mcr_new; u32 mcr_cur, mcr_new;
@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK; mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK;
@@ -3314,6 +3437,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, .ndo_poll_controller = mtk_poll_controller,
#endif #endif
.ndo_setup_tc = mtk_eth_setup_tc, .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); mtk_tx_unmap(eth, tx_buf, true);
@@ -3460,6 +3609,7 @@ static const struct net_device_ops mtk_n @@ -3463,6 +3612,7 @@ static const struct net_device_ops mtk_n
#endif #endif
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,

View File

@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MediaTek SoC family. MediaTek SoC family.
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3471,11 +3471,18 @@ static void mtk_get_strings(struct net_d @@ -3474,11 +3474,18 @@ static void mtk_get_strings(struct net_d
int i; int i;
switch (stringset) { switch (stringset) {
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
} }
} }
@@ -3483,13 +3490,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) static int mtk_get_sset_count(struct net_device *dev, int sset)
{ {
switch (sset) { switch (sset) {
@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mtk_get_ethtool_stats(struct net_device *dev, static void mtk_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
@@ -3517,6 +3546,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++) for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
*data_dst++ = *(data_src + mtk_ethtool_stats[i].offset); *data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);

View File

@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
/* strings used by ethtool */ /* 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 */ /* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) { 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; u32 gdm_config = MTK_GDMA_TO_PDMA;
int err; 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; return err;
} }
@ -84,7 +84,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
refcount_set(&eth->dma_refcnt, 1); refcount_set(&eth->dma_refcnt, 1);
} }
else else
@@ -4041,7 +4046,9 @@ static int mtk_probe(struct platform_dev @@ -4044,7 +4049,9 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4144,6 +4144,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_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4162,6 +4163,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_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4179,6 +4181,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_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
@ -68,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4212,6 +4215,7 @@ static const struct mtk_soc_data mt7986_ @@ -4215,6 +4218,7 @@ static const struct mtk_soc_data mt7986_
.caps = MT7986_CAPS, .caps = MT7986_CAPS,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { 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 */ /* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) { if (!refcount_read(&eth->dma_refcnt)) {
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
int err; int err;
err = mtk_start_dma(eth); 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; return err;
} }
@ -81,7 +81,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_gdm_config(eth, gdm_config); 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_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
@ -89,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
phylink_stop(mac->phylink); 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); mtk_dma_free(eth);
@ -100,7 +100,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
return 0; return 0;
} }
@@ -4046,12 +4051,19 @@ static int mtk_probe(struct platform_dev @@ -4049,12 +4054,19 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

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

View File

@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4161,6 +4161,7 @@ static const struct mtk_soc_data mt7621_ @@ -4164,6 +4164,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -29,7 +29,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4180,6 +4181,7 @@ static const struct mtk_soc_data mt7622_ @@ -4183,6 +4184,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -37,7 +37,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4198,6 +4200,7 @@ static const struct mtk_soc_data mt7623_ @@ -4201,6 +4203,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,

View File

@ -26,7 +26,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3888,6 +3888,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) static int mtk_probe(struct platform_device *pdev)
{ {
@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
struct device_node *mac_np; struct device_node *mac_np;
struct mtk_eth *eth; struct mtk_eth *eth;
int err, i; int err, i;
@@ -3968,16 +3969,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) if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
mtk_ppe_check_skb(eth->ppe[0], skb, hash); mtk_ppe_check_skb(eth->ppe[0], skb, hash);
@@ -4177,7 +4178,7 @@ static const struct mtk_soc_data mt7621_ @@ -4180,7 +4181,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4197,7 +4198,7 @@ static const struct mtk_soc_data mt7622_ @@ -4200,7 +4201,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4216,7 +4217,7 @@ static const struct mtk_soc_data mt7623_ @@ -4219,7 +4220,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -76,7 +76,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4248,9 +4249,11 @@ static const struct mtk_soc_data mt7986_ @@ -4251,9 +4252,11 @@ static const struct mtk_soc_data mt7986_
.reg_map = &mt7986_reg_map, .reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
.caps = MT7986_CAPS, .caps = MT7986_CAPS,

View File

@ -16,7 +16,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4252,6 +4252,7 @@ static const struct mtk_soc_data mt7986_ @@ -4255,6 +4255,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4004,19 +4004,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); eth->irq[i] = platform_get_irq(pdev, i);
if (eth->irq[i] < 0) { if (eth->irq[i] < 0) {
dev_err(&pdev->dev, "no IRQ%d resource found\n", i); dev_err(&pdev->dev, "no IRQ%d resource found\n", i);
@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
eth->clks[i] = NULL; eth->clks[i] = NULL;
} }
@@ -4027,7 +4031,7 @@ static int mtk_probe(struct platform_dev @@ -4030,7 +4034,7 @@ static int mtk_probe(struct platform_dev
err = mtk_hw_init(eth); err = mtk_hw_init(eth);
if (err) if (err)
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO); eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO);
@@ -4125,6 +4129,8 @@ err_free_dev: @@ -4128,6 +4132,8 @@ err_free_dev:
mtk_free_dev(eth); mtk_free_dev(eth);
err_deinit_hw: err_deinit_hw:
mtk_hw_deinit(eth); mtk_hw_deinit(eth);
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return err; return err;
} }
@@ -4144,6 +4150,7 @@ static int mtk_remove(struct platform_de @@ -4147,6 +4153,7 @@ static int mtk_remove(struct platform_de
phylink_disconnect_phy(mac->phylink); phylink_disconnect_phy(mac->phylink);
} }

View File

@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4087,13 +4087,13 @@ static int mtk_probe(struct platform_dev @@ -4090,13 +4090,13 @@ static int mtk_probe(struct platform_dev
eth->soc->offload_version, i); eth->soc->offload_version, i);
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;

View File

@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4087,13 +4087,13 @@ static int mtk_probe(struct platform_dev @@ -4090,13 +4090,13 @@ static int mtk_probe(struct platform_dev
eth->soc->offload_version, i); eth->soc->offload_version, i);
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;
@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
for (i = 0; i < MTK_MAX_DEVS; i++) { for (i = 0; i < MTK_MAX_DEVS; i++) {
@@ -4103,7 +4103,7 @@ static int mtk_probe(struct platform_dev @@ -4106,7 +4106,7 @@ static int mtk_probe(struct platform_dev
err = register_netdev(eth->netdev[i]); err = register_netdev(eth->netdev[i]);
if (err) { if (err) {
dev_err(eth->dev, "error bringing up device\n"); dev_err(eth->dev, "error bringing up device\n");
@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} else } else
netif_info(eth, probe, eth->netdev[i], netif_info(eth, probe, eth->netdev[i],
"mediatek frame engine at 0x%08lx, irq %d\n", "mediatek frame engine at 0x%08lx, irq %d\n",
@@ -4123,7 +4123,8 @@ static int mtk_probe(struct platform_dev @@ -4126,7 +4126,8 @@ static int mtk_probe(struct platform_dev
return 0; return 0;

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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; 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) static int mtk_hw_init(struct mtk_eth *eth)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -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 * up with the more appropriate value when mtk_mac_config call is being
* invoked. * invoked.
*/ */
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Indicates CDM to parse the MTK special tag from CPU /* Indicates CDM to parse the MTK special tag from CPU
* which also is working out for untag packets. * which also is working out for untag packets.
@@ -3350,7 +3382,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; int length = new_mtu + MTK_RX_ETH_HLEN;
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
@ -71,7 +71,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rcu_access_pointer(eth->prog) && if (rcu_access_pointer(eth->prog) &&
length > MTK_PP_MAX_BUF_SIZE) { length > MTK_PP_MAX_BUF_SIZE) {
@@ -3358,23 +3389,7 @@ static int mtk_change_mtu(struct net_dev @@ -3361,23 +3392,7 @@ static int mtk_change_mtu(struct net_dev
return -EINVAL; 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3420,11 +3420,8 @@ static void mtk_pending_work(struct work @@ -3423,11 +3423,8 @@ static void mtk_pending_work(struct work
rtnl_lock(); rtnl_lock();
dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__); dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!eth->netdev[i]) if (!eth->netdev[i])
@@ -3458,7 +3455,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__); 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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; 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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)); 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) static int mtk_hw_init(struct mtk_eth *eth)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -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; 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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); 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 | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE; 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; return 0;
} }
@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
@@ -3448,7 +3500,7 @@ static void mtk_pending_work(struct work @@ -3451,7 +3503,7 @@ static void mtk_pending_work(struct work
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
eth->dev->pins->default_state); eth->dev->pins->default_state);
@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -4050,7 +4102,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); eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
INIT_WORK(&eth->pending_work, mtk_pending_work); 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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); kfree(eth->scratch_head);
} }
@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
schedule_work(&eth->pending_work); 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; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int i, val, ret; int i, val, ret;
@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->ethsys) if (eth->ethsys)
regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask, 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; return 0;
err_disable_pm: err_disable_pm:
@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return ret; return ret;
} }
@@ -3472,30 +3491,53 @@ static int mtk_do_ioctl(struct net_devic @@ -3475,30 +3494,53 @@ static int mtk_do_ioctl(struct net_devic
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (eth->dev->pins) if (eth->dev->pins)
pinctrl_select_state(eth->dev->pins->p, pinctrl_select_state(eth->dev->pins->p,
@@ -3506,15 +3548,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++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
if (!test_bit(i, &restart)) if (!test_bit(i, &restart))
continue; continue;

View File

@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
}; };
/* strings used by ethtool */ /* 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); 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) static int mtk_hw_init(struct mtk_eth *eth, bool reset)
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
@@ -3598,6 +3700,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_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
return 0; return 0;
} }
@@ -4035,6 +4138,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; eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->rx_dim.work, mtk_dim_rx); 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; eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
INIT_WORK(&eth->tx_dim.work, mtk_dim_tx); INIT_WORK(&eth->tx_dim.work, mtk_dim_tx);
@@ -4239,6 +4343,8 @@ static int mtk_probe(struct platform_dev @@ -4242,6 +4346,8 @@ static int mtk_probe(struct platform_dev
NAPI_POLL_WEIGHT); NAPI_POLL_WEIGHT);
platform_set_drvdata(pdev, eth); 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3629,6 +3629,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); set_bit(MTK_RESETTING, &eth->state);
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -3666,6 +3671,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); 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, ring->phys_pdma);
ring->dma_pdma = NULL; 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]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev, 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4422,7 +4422,7 @@ static const struct mtk_soc_data mt7621_ @@ -4425,7 +4425,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
@@ -4461,7 +4461,7 @@ static const struct mtk_soc_data mt7623_ @@ -4464,7 +4464,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,

View File

@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} else { } else {
mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0); mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0); 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)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
else else
val |= MTK_RX_BT_32DWORDS; val |= MTK_RX_BT_32DWORDS;
mtk_w32(eth, val, reg_map->qdma.glo_cfg); 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); 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) static int mtk_open(struct net_device *dev)
{ {
struct mtk_mac *mac = netdev_priv(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); refcount_inc(&eth->dma_refcnt);
phylink_start(mac->phylink); phylink_start(mac->phylink);
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3700,8 +3856,12 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3703,8 +3859,12 @@ static int mtk_unreg_dev(struct mtk_eth
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
unregister_netdev(eth->netdev[i]); unregister_netdev(eth->netdev[i]);
} }
@@ -3918,6 +4078,23 @@ static int mtk_set_rxnfc(struct net_devi @@ -3921,6 +4081,23 @@ static int mtk_set_rxnfc(struct net_devi
return ret; return ret;
} }
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops mtk_ethtool_ops = { static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings, .get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings,
@@ -3952,6 +4129,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_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,
.ndo_xdp_xmit = mtk_xdp_xmit, .ndo_xdp_xmit = mtk_xdp_xmit,
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}; };
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
@@ -3961,6 +4139,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 phylink *phylink;
struct mtk_mac *mac; struct mtk_mac *mac;
int id, err; int id, err;
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!_id) { if (!_id) {
dev_err(eth->dev, "missing mac id\n"); dev_err(eth->dev, "missing mac id\n");
@@ -3978,7 +4157,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; return -EINVAL;
} }
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!eth->netdev[id]) { if (!eth->netdev[id]) {
dev_err(eth->dev, "alloc_etherdev failed\n"); dev_err(eth->dev, "alloc_etherdev failed\n");
return -ENOMEM; return -ENOMEM;
@@ -4086,6 +4268,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4089,6 +4271,11 @@ static int mtk_add_mac(struct mtk_eth *e
else else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;

View File

@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
skb_record_rx_queue(skb, 0); 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) 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 */ /* 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; 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); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { 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); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, 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 */ /* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -3848,6 +3908,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]); 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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; struct mtk_eth *eth = mac->hw;
int i, err; 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++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = 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 { } else {
/* Hardware special tag parsing needs to be disabled if at least /* 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 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -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; val |= config;
@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val |= MTK_GDMA_SPECIAL_TAG; val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); 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; struct mtk_eth *eth = mac->hw;
int i, err; 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++) { for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
struct metadata_dst *md_dst = 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 { } else {
/* Hardware special tag parsing needs to be disabled if at least /* Hardware special tag parsing needs to be disabled if at least

View File

@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_eth_path_name(path), __func__, updated); mtk_eth_path_name(path), __func__, updated);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4749,6 +4749,26 @@ static const struct mtk_soc_data mt7629_ @@ -4752,6 +4752,26 @@ static const struct mtk_soc_data mt7629_
}, },
}; };
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct mtk_soc_data mt7986_data = { static const struct mtk_soc_data mt7986_data = {
.reg_map = &mt7986_reg_map, .reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
@@ -4791,6 +4811,7 @@ const struct of_device_id of_mtk_match[] @@ -4794,6 +4814,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
return NULL; return NULL;
@@ -3960,8 +3961,17 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3963,8 +3964,17 @@ static int mtk_unreg_dev(struct mtk_eth
return 0; return 0;
} }
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mtk_unreg_dev(eth); mtk_unreg_dev(eth);
mtk_free_dev(eth); mtk_free_dev(eth);
cancel_work_sync(&eth->pending_work); cancel_work_sync(&eth->pending_work);
@@ -4401,6 +4411,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(); rtnl_unlock();
} }
@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
struct resource *res = NULL; struct resource *res = NULL;
@@ -4464,13 +4504,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)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (err) if (err)
return err; return err;
@@ -4481,14 +4515,17 @@ static int mtk_probe(struct platform_dev @@ -4484,14 +4518,17 @@ static int mtk_probe(struct platform_dev
"mediatek,pctl"); "mediatek,pctl");
if (IS_ERR(eth->pctl)) { if (IS_ERR(eth->pctl)) {
dev_err(&pdev->dev, "no pctl regmap found\n"); dev_err(&pdev->dev, "no pctl regmap found\n");
@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {
@@ -4649,6 +4686,8 @@ err_deinit_hw: @@ -4652,6 +4689,8 @@ err_deinit_hw:
mtk_hw_deinit(eth); mtk_hw_deinit(eth);
err_wed_exit: err_wed_exit:
mtk_wed_exit(); mtk_wed_exit();

View File

@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4635,8 +4635,8 @@ static int mtk_probe(struct platform_dev @@ -4638,8 +4638,8 @@ static int mtk_probe(struct platform_dev
for (i = 0; i < num_ppe; i++) { for (i = 0; i < num_ppe; i++) {
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;
goto err_deinit_ppe; goto err_deinit_ppe;
@@ -4762,6 +4762,7 @@ static const struct mtk_soc_data mt7622_ @@ -4765,6 +4765,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4799,6 +4800,7 @@ static const struct mtk_soc_data mt7629_ @@ -4802,6 +4803,7 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4819,6 +4821,7 @@ static const struct mtk_soc_data mt7981_ @@ -4822,6 +4824,7 @@ static const struct mtk_soc_data mt7981_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
@ -88,7 +88,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4839,6 +4842,7 @@ static const struct mtk_soc_data mt7986_ @@ -4842,6 +4845,7 @@ static const struct mtk_soc_data mt7986_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),

View File

@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
skb_record_rx_queue(skb, 0); skb_record_rx_queue(skb, 0);
napi_gro_receive(napi, skb); napi_gro_receive(napi, skb);
@@ -2831,29 +2814,11 @@ static netdev_features_t mtk_fix_feature @@ -2834,29 +2817,11 @@ static netdev_features_t mtk_fix_feature
static int mtk_set_features(struct net_device *dev, netdev_features_t features) static int mtk_set_features(struct net_device *dev, netdev_features_t features)
{ {
@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3167,30 +3132,6 @@ static int mtk_open(struct net_device *d @@ -3170,30 +3135,6 @@ static int mtk_open(struct net_device *d
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
int i, err; int i, err;
@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) { if (err) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
@@ -3231,6 +3172,35 @@ static int mtk_open(struct net_device *d @@ -3234,6 +3175,35 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3715,10 +3685,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3718,10 +3688,9 @@ static int mtk_hw_init(struct mtk_eth *e
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* set interrupt delays based on current Net DIM sample */ /* set interrupt delays based on current Net DIM sample */
mtk_dim_rx(&eth->rx_dim.work); mtk_dim_rx(&eth->rx_dim.work);
@@ -4358,7 +4327,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4361,7 +4330,7 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth->netdev[id]->vlan_features = eth->soc->hw_features & eth->netdev[id]->vlan_features = eth->soc->hw_features &

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4711,7 +4711,7 @@ static const struct mtk_soc_data mt7621_ @@ -4714,7 +4714,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4732,7 +4732,7 @@ static const struct mtk_soc_data mt7622_ @@ -4735,7 +4735,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4751,7 +4751,7 @@ static const struct mtk_soc_data mt7623_ @@ -4754,7 +4754,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4789,8 +4789,8 @@ static const struct mtk_soc_data mt7981_ @@ -4792,8 +4792,8 @@ static const struct mtk_soc_data mt7981_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
@@ -4810,8 +4810,8 @@ static const struct mtk_soc_data mt7986_ @@ -4813,8 +4813,8 @@ static const struct mtk_soc_data mt7986_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,

View File

@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
/* mt7623_pad_clk_setup */ /* mt7623_pad_clk_setup */
for (i = 0 ; i < NUM_TRGMII_CTRL; i++) for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
@@ -4286,13 +4258,19 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4289,13 +4261,19 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD; MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;
@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id) if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id)
__set_bit(PHY_INTERFACE_MODE_TRGMII, __set_bit(PHY_INTERFACE_MODE_TRGMII,
@@ -4752,6 +4730,7 @@ static const struct mtk_soc_data mt7623_ @@ -4755,6 +4733,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,

View File

@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
.mac_config = mtk_mac_config, .mac_config = mtk_mac_config,
.mac_finish = mtk_mac_finish, .mac_finish = mtk_mac_finish,
.mac_link_down = mtk_mac_link_down, .mac_link_down = mtk_mac_link_down,
@@ -4253,8 +4220,6 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4256,8 +4223,6 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rxd->rxd5 = 0; rxd->rxd5 = 0;
rxd->rxd6 = 0; rxd->rxd6 = 0;
rxd->rxd7 = 0; rxd->rxd7 = 0;
@@ -2967,7 +2967,7 @@ static int mtk_start_dma(struct mtk_eth @@ -2970,7 +2970,7 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO | MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE; MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val |= MTK_MUTLI_CNT | MTK_RESV_BUF | val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
MTK_WCOMP_EN | MTK_DMAD_WR_WDONE | MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN; MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN;
@@ -3111,7 +3111,7 @@ static int mtk_open(struct net_device *d @@ -3114,7 +3114,7 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -150,7 +150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return 0; return 0;
if (mtk_uses_dsa(dev) && !eth->prog) { if (mtk_uses_dsa(dev) && !eth->prog) {
@@ -3376,7 +3376,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3379,7 +3379,7 @@ static void mtk_hw_reset(struct mtk_eth
{ {
u32 val; u32 val;
@ -159,7 +159,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0); regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0);
val = RSTCTRL_PPE0_V2; val = RSTCTRL_PPE0_V2;
} else { } else {
@@ -3388,7 +3388,7 @@ static void mtk_hw_reset(struct mtk_eth @@ -3391,7 +3391,7 @@ static void mtk_hw_reset(struct mtk_eth
ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val); ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val);
@ -168,7 +168,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
0x3ffffff); 0x3ffffff);
} }
@@ -3414,7 +3414,7 @@ static void mtk_hw_warm_reset(struct mtk @@ -3417,7 +3417,7 @@ static void mtk_hw_warm_reset(struct mtk
return; return;
} }
@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2; rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2;
else else
rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0; rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0;
@@ -3584,7 +3584,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3587,7 +3587,7 @@ static int mtk_hw_init(struct mtk_eth *e
else else
mtk_hw_reset(eth); mtk_hw_reset(eth);
@ -186,7 +186,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
val = mtk_r32(eth, MTK_FE_GLO_MISC); val = mtk_r32(eth, MTK_FE_GLO_MISC);
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
@@ -3621,7 +3621,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3624,7 +3624,7 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@ -195,7 +195,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@@ -3643,7 +3643,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3646,7 +3646,7 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* PSE should not drop port8 and port9 packets from WDMA Tx */ /* PSE should not drop port8 and port9 packets from WDMA Tx */
mtk_w32(eth, 0x00000300, PSE_DROP_CFG); mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
@@ -4432,7 +4432,7 @@ static int mtk_probe(struct platform_dev @@ -4435,7 +4435,7 @@ static int mtk_probe(struct platform_dev
} }
} }
@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
err = -EINVAL; err = -EINVAL;
@@ -4540,9 +4540,8 @@ static int mtk_probe(struct platform_dev @@ -4543,9 +4543,8 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {
@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe); num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe);
for (i = 0; i < num_ppe; i++) { for (i = 0; i < num_ppe; i++) {
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
@@ -4636,6 +4635,7 @@ static const struct mtk_soc_data mt2701_ @@ -4639,6 +4638,7 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -232,7 +232,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4652,6 +4652,7 @@ static const struct mtk_soc_data mt7621_ @@ -4655,6 +4655,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -4672,6 +4673,7 @@ static const struct mtk_soc_data mt7622_ @@ -4675,6 +4676,7 @@ static const struct mtk_soc_data mt7622_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7622_CLKS_BITMAP, .required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -248,7 +248,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
@@ -4692,6 +4694,7 @@ static const struct mtk_soc_data mt7623_ @@ -4695,6 +4697,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -256,7 +256,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -4714,6 +4717,7 @@ static const struct mtk_soc_data mt7629_ @@ -4717,6 +4720,7 @@ static const struct mtk_soc_data mt7629_
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.has_accounting = true, .has_accounting = true,
@ -264,7 +264,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4731,6 +4735,7 @@ static const struct mtk_soc_data mt7981_ @@ -4734,6 +4738,7 @@ static const struct mtk_soc_data mt7981_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7981_CLKS_BITMAP, .required_clks = MT7981_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -272,7 +272,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
@@ -4752,6 +4757,7 @@ static const struct mtk_soc_data mt7986_ @@ -4755,6 +4760,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
@@ -4772,6 +4778,7 @@ static const struct mtk_soc_data rt5350_ @@ -4775,6 +4781,7 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628, .hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
!eth->netdev[mac])) !eth->netdev[mac]))
goto release_desc; goto release_desc;
@@ -2841,7 +2841,7 @@ static void mtk_dma_free(struct mtk_eth @@ -2844,7 +2844,7 @@ static void mtk_dma_free(struct mtk_eth
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
int i; int i;
@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (eth->netdev[i]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) { if (eth->scratch_ring) {
@@ -2995,8 +2995,13 @@ static void mtk_gdm_config(struct mtk_et @@ -2998,8 +2998,13 @@ static void mtk_gdm_config(struct mtk_et
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
return; return;
@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* default setup the forward port to send frame to PDMA */ /* default setup the forward port to send frame to PDMA */
val &= ~0xffff; val &= ~0xffff;
@@ -3006,7 +3011,7 @@ static void mtk_gdm_config(struct mtk_et @@ -3009,7 +3014,7 @@ static void mtk_gdm_config(struct mtk_et
val |= config; val |= config;
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
val |= MTK_GDMA_SPECIAL_TAG; val |= MTK_GDMA_SPECIAL_TAG;
mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i)); mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
@@ -3605,15 +3610,15 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3608,15 +3613,15 @@ static int mtk_hw_init(struct mtk_eth *e
* up with the more appropriate value when mtk_mac_config call is being * up with the more appropriate value when mtk_mac_config call is being
* invoked. * invoked.
*/ */
@ -109,7 +109,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
/* Indicates CDM to parse the MTK special tag from CPU /* Indicates CDM to parse the MTK special tag from CPU
@@ -3793,7 +3798,7 @@ static void mtk_pending_work(struct work @@ -3796,7 +3801,7 @@ static void mtk_pending_work(struct work
mtk_prepare_for_reset(eth); mtk_prepare_for_reset(eth);
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (!eth->netdev[i] || !netif_running(eth->netdev[i])) if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
continue; continue;
@@ -3809,8 +3814,8 @@ static void mtk_pending_work(struct work @@ -3812,8 +3817,8 @@ static void mtk_pending_work(struct work
mtk_hw_init(eth, true); mtk_hw_init(eth, true);
/* restart DMA and enable IRQs */ /* restart DMA and enable IRQs */
@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
continue; continue;
if (mtk_open(eth->netdev[i])) { if (mtk_open(eth->netdev[i])) {
@@ -3837,7 +3842,7 @@ static int mtk_free_dev(struct mtk_eth * @@ -3840,7 +3845,7 @@ static int mtk_free_dev(struct mtk_eth *
{ {
int i; int i;
@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
@@ -3856,7 +3861,7 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3859,7 +3864,7 @@ static int mtk_unreg_dev(struct mtk_eth
{ {
int i; int i;
@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mtk_mac *mac; struct mtk_mac *mac;
if (!eth->netdev[i]) if (!eth->netdev[i])
continue; continue;
@@ -4157,7 +4162,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4160,7 +4165,7 @@ static int mtk_add_mac(struct mtk_eth *e
} }
id = be32_to_cpup(_id); id = be32_to_cpup(_id);
@ -156,7 +156,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dev_err(eth->dev, "%d is not a valid mac id\n", id); dev_err(eth->dev, "%d is not a valid mac id\n", id);
return -EINVAL; return -EINVAL;
} }
@@ -4302,7 +4307,7 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -4305,7 +4310,7 @@ void mtk_eth_set_dma_device(struct mtk_e
rtnl_lock(); rtnl_lock();
@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dev = eth->netdev[i]; dev = eth->netdev[i];
if (!dev || !(dev->flags & IFF_UP)) if (!dev || !(dev->flags & IFF_UP))
@@ -4610,7 +4615,7 @@ static int mtk_remove(struct platform_de @@ -4613,7 +4618,7 @@ static int mtk_remove(struct platform_de
int i; int i;
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */

View File

@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
budget--; budget--;
} }
@@ -3648,7 +3676,24 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3651,7 +3679,24 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4); mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* PSE should not drop port8 and port9 packets from WDMA Tx */ /* PSE should not drop port8 and port9 packets from WDMA Tx */
mtk_w32(eth, 0x00000300, PSE_DROP_CFG); mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
@@ -4210,7 +4255,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4213,7 +4258,11 @@ static int mtk_add_mac(struct mtk_eth *e
} }
spin_lock_init(&mac->hw_stats->stats_lock); spin_lock_init(&mac->hw_stats->stats_lock);
u64_stats_init(&mac->hw_stats->syncp); u64_stats_init(&mac->hw_stats->syncp);

View File

@ -263,7 +263,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid); data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
WRITE_ONCE(desc->txd4, data); WRITE_ONCE(desc->txd4, data);
@@ -4304,6 +4433,17 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4307,6 +4436,17 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.supported_interfaces); mac->phylink_config.supported_interfaces);
} }
@ -281,7 +281,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
phylink = phylink_create(&mac->phylink_config, phylink = phylink_create(&mac->phylink_config,
of_fwnode_handle(mac->of_node), of_fwnode_handle(mac->of_node),
phy_mode, &mtk_phylink_ops); phy_mode, &mtk_phylink_ops);
@@ -4826,6 +4966,24 @@ static const struct mtk_soc_data mt7986_ @@ -4829,6 +4969,24 @@ static const struct mtk_soc_data mt7986_
}, },
}; };
@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map, .reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS, .caps = MT7628_CAPS,
@@ -4844,14 +5002,15 @@ static const struct mtk_soc_data rt5350_ @@ -4847,14 +5005,15 @@ static const struct mtk_soc_data rt5350_
}; };
const struct of_device_id of_mtk_match[] = { const struct of_device_id of_mtk_match[] = {

View File

@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4974,6 +4974,9 @@ static const struct mtk_soc_data mt7988_ @@ -4977,6 +4977,9 @@ static const struct mtk_soc_data mt7988_
.required_clks = MT7988_CLKS_BITMAP, .required_clks = MT7988_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.version = 3, .version = 3,

View File

@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4976,6 +4976,7 @@ static const struct mtk_soc_data mt7988_ @@ -4979,6 +4979,7 @@ static const struct mtk_soc_data mt7988_
.version = 3, .version = 3,
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,

View File

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -3538,19 +3538,34 @@ static void mtk_hw_reset(struct mtk_eth @@ -3541,19 +3541,34 @@ static void mtk_hw_reset(struct mtk_eth
{ {
u32 val; u32 val;
@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
0x3ffffff); 0x3ffffff);
} }
@@ -3576,13 +3591,21 @@ static void mtk_hw_warm_reset(struct mtk @@ -3579,13 +3594,21 @@ static void mtk_hw_warm_reset(struct mtk
return; return;
} }
@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask); regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask);
@@ -3934,11 +3957,17 @@ static void mtk_prepare_for_reset(struct @@ -3937,11 +3960,17 @@ static void mtk_prepare_for_reset(struct
u32 val; u32 val;
int i; int i;
@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* adjust PPE configurations to prepare for reset */ /* adjust PPE configurations to prepare for reset */
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
@@ -3999,11 +4028,18 @@ static void mtk_pending_work(struct work @@ -4002,11 +4031,18 @@ static void mtk_pending_work(struct work
} }
} }

View File

@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
ring->dma_size * eth->soc->txrx.rxd_size, ring->dma_size * eth->soc->txrx.rxd_size,
ring->dma, ring->phys); ring->dma, ring->phys);
@@ -3001,7 +3025,7 @@ static void mtk_dma_free(struct mtk_eth @@ -3004,7 +3028,7 @@ static void mtk_dma_free(struct mtk_eth
for (i = 0; i < MTK_MAX_DEVS; i++) for (i = 0; i < MTK_MAX_DEVS; i++)
if (eth->netdev[i]) if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
MTK_QDMA_RING_SIZE * soc->txrx.txd_size, MTK_QDMA_RING_SIZE * soc->txrx.txd_size,
eth->scratch_ring, eth->phy_scratch_ring); eth->scratch_ring, eth->phy_scratch_ring);
@@ -3009,13 +3033,13 @@ static void mtk_dma_free(struct mtk_eth @@ -3012,13 +3036,13 @@ static void mtk_dma_free(struct mtk_eth
eth->phy_scratch_ring = 0; eth->phy_scratch_ring = 0;
} }
mtk_tx_clean(eth); mtk_tx_clean(eth);
@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} }
kfree(eth->scratch_head); kfree(eth->scratch_head);
@@ -4585,7 +4609,7 @@ static int mtk_sgmii_init(struct mtk_eth @@ -4588,7 +4612,7 @@ static int mtk_sgmii_init(struct mtk_eth
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct device_node *mac_np; struct device_node *mac_np;
struct mtk_eth *eth; struct mtk_eth *eth;
int err, i; int err, i;
@@ -4605,6 +4629,20 @@ static int mtk_probe(struct platform_dev @@ -4608,6 +4632,20 @@ static int mtk_probe(struct platform_dev
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
eth->ip_align = NET_IP_ALIGN; eth->ip_align = NET_IP_ALIGN;
@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
spin_lock_init(&eth->page_lock); spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock); spin_lock_init(&eth->tx_irq_lock);
spin_lock_init(&eth->rx_irq_lock); spin_lock_init(&eth->rx_irq_lock);
@@ -4668,6 +4706,18 @@ static int mtk_probe(struct platform_dev @@ -4671,6 +4709,18 @@ static int mtk_probe(struct platform_dev
err = -EINVAL; err = -EINVAL;
goto err_destroy_sgmii; goto err_destroy_sgmii;
} }

View File

@ -90,7 +90,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ring->buf_size, DMA_FROM_DEVICE); ring->buf_size, DMA_FROM_DEVICE);
mtk_rx_put_buff(ring, ring->data[i], false); mtk_rx_put_buff(ring, ring->data[i], false);
} }
@@ -4643,6 +4661,14 @@ static int mtk_probe(struct platform_dev @@ -4646,6 +4664,14 @@ static int mtk_probe(struct platform_dev
} }
} }

View File

@ -105,7 +105,7 @@ Subject: [PATCH] kernel: add block fit partition parser
/* everything is up and running, commence */ /* everything is up and running, commence */
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL); err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
if (err) if (err)
@@ -598,6 +610,11 @@ static bool blk_add_partition(struct gen @@ -595,6 +607,11 @@ static bool blk_add_partition(struct gen
(state->parts[p].flags & ADDPART_FLAG_RAID)) (state->parts[p].flags & ADDPART_FLAG_RAID))
md_autodetect_dev(part->bd_dev); md_autodetect_dev(part->bd_dev);

View File

@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
@@ -6886,6 +6887,22 @@ static void rtl_tally_reset(struct r8152 @@ -6889,6 +6890,22 @@ static void rtl_tally_reset(struct r8152
ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data);
} }
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
static void r8152b_init(struct r8152 *tp) static void r8152b_init(struct r8152 *tp)
{ {
u32 ocp_data; u32 ocp_data;
@@ -6927,6 +6944,8 @@ static void r8152b_init(struct r8152 *tp @@ -6930,6 +6947,8 @@ static void r8152b_init(struct r8152 *tp
ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL);
ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN);
ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data);
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153_init(struct r8152 *tp) static void r8153_init(struct r8152 *tp)
@@ -7067,6 +7086,8 @@ static void r8153_init(struct r8152 *tp) @@ -7070,6 +7089,8 @@ static void r8153_init(struct r8152 *tp)
tp->coalesce = COALESCE_SLOW; tp->coalesce = COALESCE_SLOW;
break; break;
} }
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
} }
static void r8153b_init(struct r8152 *tp) static void r8153b_init(struct r8152 *tp)
@@ -7149,6 +7170,8 @@ static void r8153b_init(struct r8152 *tp @@ -7152,6 +7173,8 @@ static void r8153b_init(struct r8152 *tp
rtl_tally_reset(tp); rtl_tally_reset(tp);
tp->coalesce = 15000; /* 15 us */ tp->coalesce = 15000; /* 15 us */

View File

@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *, INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32)); u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *, INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -1986,9 +2000,11 @@ static void __sk_free(struct sock *sk) @@ -1987,9 +2001,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt)) if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1); sock_inuse_add(sock_net(sk), -1);

View File

@ -235,7 +235,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe) if (!pe)
--- a/mm/vmalloc.c --- a/mm/vmalloc.c
+++ b/mm/vmalloc.c +++ b/mm/vmalloc.c
@@ -3968,6 +3968,8 @@ static const struct seq_operations vmall @@ -3986,6 +3986,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void) static int __init proc_vmalloc_init(void)
{ {
@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c --- a/net/core/sock.c
+++ b/net/core/sock.c +++ b/net/core/sock.c
@@ -3880,6 +3880,8 @@ static __net_initdata struct pernet_oper @@ -3881,6 +3881,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void) static int __init proto_init(void)
{ {
@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c
@@ -3024,11 +3024,13 @@ static const struct seq_operations fib_r @@ -3025,11 +3025,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net) int __net_init fib_proc_init(struct net *net)
{ {
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL)) fib_triestat_seq_show, NULL))
goto out2; goto out2;
@@ -3039,17 +3041,21 @@ int __net_init fib_proc_init(struct net @@ -3040,17 +3042,21 @@ int __net_init fib_proc_init(struct net
return 0; return 0;
out3: out3:

View File

@ -193,7 +193,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
default y default y
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -1271,6 +1271,8 @@ static u8 spi_nor_convert_3to4_erase(u8 @@ -1272,6 +1272,8 @@ static u8 spi_nor_convert_3to4_erase(u8
static bool spi_nor_has_uniform_erase(const struct spi_nor *nor) static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
{ {
@ -202,7 +202,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
return !!nor->params->erase_map.uniform_erase_type; return !!nor->params->erase_map.uniform_erase_type;
} }
@@ -2400,6 +2402,7 @@ static int spi_nor_select_erase(struct s @@ -2401,6 +2403,7 @@ static int spi_nor_select_erase(struct s
{ {
struct spi_nor_erase_map *map = &nor->params->erase_map; struct spi_nor_erase_map *map = &nor->params->erase_map;
const struct spi_nor_erase_type *erase = NULL; const struct spi_nor_erase_type *erase = NULL;
@ -210,7 +210,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
struct mtd_info *mtd = &nor->mtd; struct mtd_info *mtd = &nor->mtd;
u32 wanted_size = nor->info->sector_size; u32 wanted_size = nor->info->sector_size;
int i; int i;
@@ -2432,8 +2435,9 @@ static int spi_nor_select_erase(struct s @@ -2433,8 +2436,9 @@ static int spi_nor_select_erase(struct s
*/ */
for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) { for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
if (map->erase_type[i].size) { if (map->erase_type[i].size) {
@ -222,7 +222,7 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
} }
} }
@@ -2441,6 +2445,9 @@ static int spi_nor_select_erase(struct s @@ -2442,6 +2446,9 @@ static int spi_nor_select_erase(struct s
return -EINVAL; return -EINVAL;
mtd->erasesize = erase->size; mtd->erasesize = erase->size;

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