kernel: bump 5.4 to 5.4.165 (#8448)

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*FS#4149 affects me so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1

Signed-off-by: John Audia <graysky@archlinux.us>

Co-authored-by: John Audia <graysky@archlinux.us>
This commit is contained in:
Beginner 2021-12-17 15:21:49 +08:00 committed by GitHub
parent 252bd55b5f
commit a8490915d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 138 additions and 476 deletions

View File

@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif endif
LINUX_VERSION-5.4 = .162 LINUX_VERSION-5.4 = .165
LINUX_VERSION-5.10 = .85 LINUX_VERSION-5.10 = .85
LINUX_KERNEL_HASH-5.4.162 = c12d72ddaac78189305a5e98825295ecb02282970033b052276035e83189e25b LINUX_KERNEL_HASH-5.4.165 = ba13da6d18476269ce2a608cc1a4d69d61cca79585c07675495e3fbc8f9d2acc
LINUX_KERNEL_HASH-5.10.85 = ba89162605ac447db8953c29f649b64d16aff7de8145e2db30d759e5476b19ac LINUX_KERNEL_HASH-5.10.85 = ba89162605ac447db8953c29f649b64d16aff7de8145e2db30d759e5476b19ac
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))

View File

@ -1,137 +0,0 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sat, 1 Oct 2016 22:54:48 +0200
Subject: [PATCH] usb: xhci: add support for performing fake doorbell
Broadcom's Northstar XHCI controllers seem to need a special start
procedure to work correctly. There isn't any official documentation of
this, the problem is that controller doesn't detect any connected
devices with default setup. Moreover connecting USB device to controller
that doesn't run properly can cause SoC's watchdog issues.
A workaround that was successfully tested on multiple devices is to
perform a fake doorbell. This patch adds code for doing this and enables
it on BCM4708 family.
---
drivers/usb/host/xhci-plat.c | 6 +++++
drivers/usb/host/xhci.c | 63 +++++++++++++++++++++++++++++++++++++++++---
drivers/usb/host/xhci.h | 1 +
3 files changed, 67 insertions(+), 3 deletions(-)
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -87,6 +87,8 @@ static int xhci_priv_resume_quirk(struct
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
{
struct xhci_plat_priv *priv = xhci_to_priv(xhci);
+ struct platform_device*pdev = to_platform_device(dev);
+ struct device_node *node = pdev->dev.of_node;
/*
* As of now platform drivers don't provide MSI support so we ensure
@@ -94,6 +96,9 @@ static void xhci_plat_quirks(struct devi
* dev struct in order to setup MSI
*/
xhci->quirks |= XHCI_PLAT | priv->quirks;
+
+ if (node && of_machine_is_compatible("brcm,bcm4708"))
+ xhci->quirks |= XHCI_FAKE_DOORBELL;
}
/* called during probe() after chip reset completes */
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -156,6 +156,49 @@ int xhci_start(struct xhci_hcd *xhci)
return ret;
}
+/**
+ * xhci_fake_doorbell - Perform a fake doorbell on a specified slot
+ *
+ * Some controllers require a fake doorbell to start correctly. Without that
+ * they simply don't detect any devices.
+ */
+static int xhci_fake_doorbell(struct xhci_hcd *xhci, int slot_id)
+{
+ u32 temp;
+
+ /* Alloc a virt device for that slot */
+ if (!xhci_alloc_virt_device(xhci, slot_id, NULL, GFP_NOIO)) {
+ xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
+ return -ENOMEM;
+ }
+
+ /* Ring fake doorbell for slot_id ep 0 */
+ xhci_ring_ep_doorbell(xhci, slot_id, 0, 0);
+ usleep_range(1000, 1500);
+
+ /* Read the status to check if HSE is set or not */
+ temp = readl(&xhci->op_regs->status);
+
+ /* Clear HSE if set */
+ if (temp & STS_FATAL) {
+ xhci_dbg(xhci, "HSE problem detected, status: 0x%08x\n", temp);
+ temp &= ~0x1fff;
+ temp |= STS_FATAL;
+ writel(temp, &xhci->op_regs->status);
+ usleep_range(1000, 1500);
+ readl(&xhci->op_regs->status);
+ }
+
+ /* Free virt device */
+ xhci_free_virt_device(xhci, slot_id);
+
+ /* We're done if controller is already running */
+ if (readl(&xhci->op_regs->command) & CMD_RUN)
+ return 0;
+
+ return xhci_start(xhci);
+}
+
/*
* Reset a halted HC.
*
@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd
static int xhci_run_finished(struct xhci_hcd *xhci)
{
- if (xhci_start(xhci)) {
- xhci_halt(xhci);
- return -ENODEV;
+ int err;
+
+ err = xhci_start(xhci);
+ if (err) {
+ err = -ENODEV;
+ goto err_halt;
}
+
+ if (xhci->quirks & XHCI_FAKE_DOORBELL) {
+ err = xhci_fake_doorbell(xhci, 1);
+ if (err)
+ goto err_halt;
+ }
+
xhci->shared_hcd->state = HC_STATE_RUNNING;
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished xhci_run for USB3 roothub");
return 0;
+
+err_halt:
+ xhci_halt(xhci);
+ return err;
}
/*
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1885,6 +1885,7 @@ struct xhci_hcd {
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(42)
+#define XHCI_FAKE_DOORBELL BIT_ULL(44)
unsigned int num_active_eps;
unsigned int limit_active_eps;

View File

@ -1,64 +0,0 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7900
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -116,6 +116,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
bcm4709-buffalo-wxr-1900dhp.dtb \
bcm4709-linksys-ea9200.dtb \
bcm4709-netgear-r7000.dtb \
+ bcm4709-netgear-r7900.dtb \
bcm4709-netgear-r8000.dtb \
bcm4709-tplink-archer-c9-v1.dtb \
bcm47094-dlink-dir-885l.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts
@@ -0,0 +1,42 @@
+/*
+ * Broadcom BCM470X / BCM5301X ARM platform code.
+ * DTS for Netgear R7900
+ *
+ * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+
+/dts-v1/;
+
+#include "bcm4709.dtsi"
+#include "bcm5301x-nand-cs0-bch8.dtsi"
+
+/ {
+ compatible = "netgear,r7900", "brcm,bcm4709", "brcm,bcm4708";
+ model = "Netgear R7900";
+
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
+ memory {
+ reg = <0x00000000 0x08000000
+ 0x88000000 0x08000000>;
+ };
+
+ axi@18000000 {
+ usb3@23000 {
+ reg = <0x00023000 0x1000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&uart0 {
+ status = "okay";
+};

View File

@ -1,59 +0,0 @@
From 2a2af518266a29323cf30c3f9ba9ef2ceb1dd84b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
Date: Thu, 16 Oct 2014 20:52:16 +0200
Subject: [PATCH] UBI: Detect EOF mark and erase all remaining blocks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/mtd/ubi/attach.c | 5 +++++
drivers/mtd/ubi/io.c | 4 ++++
drivers/mtd/ubi/ubi.h | 1 +
3 files changed, 10 insertions(+)
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -82,6 +82,9 @@ static int self_check_ai(struct ubi_devi
#define AV_ADD BIT(1)
#define AV_FIND_OR_ADD (AV_FIND | AV_ADD)
+/* Set on finding block with 0xdeadc0de, indicates erasing all blocks behind */
+bool erase_all_next;
+
/**
* find_or_add_av - internal function to find a volume, add a volume or do
* both (find and add if missing).
@@ -1580,6 +1583,8 @@ int ubi_attach(struct ubi_device *ubi, i
if (!ai)
return -ENOMEM;
+ erase_all_next = false;
+
#ifdef CONFIG_MTD_UBI_FASTMAP
/* On small flash devices we disable fastmap in any case. */
if ((int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd) <= UBI_FM_MAX_START) {
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -710,6 +710,10 @@ int ubi_io_read_ec_hdr(struct ubi_device
}
magic = be32_to_cpu(ec_hdr->magic);
+ if (magic == 0xdeadc0de)
+ erase_all_next = true;
+ if (erase_all_next)
+ return read_err ? UBI_IO_FF_BITFLIPS : UBI_IO_FF;
if (magic != UBI_EC_HDR_MAGIC) {
if (mtd_is_eccerr(read_err))
return UBI_IO_BAD_HDR_EBADMSG;
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -824,6 +824,7 @@ extern struct mutex ubi_devices_mutex;
extern struct blocking_notifier_head ubi_notifiers;
/* attach.c */
+extern bool erase_all_next;
struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum,
int ec);
void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb);

View File

@ -1,80 +0,0 @@
From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Mon, 15 Aug 2016 10:30:41 +0200
Subject: [PATCH] BCM53573 minor hacks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
--- a/arch/arm/boot/dts/bcm53573.dtsi
+++ b/arch/arm/boot/dts/bcm53573.dtsi
@@ -54,6 +54,7 @@
<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&ilp>;
};
clocks {
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -328,14 +328,6 @@ static int bcma_register_devices(struct
}
#endif
-#ifdef CONFIG_BCMA_SFLASH
- if (bus->drv_cc.sflash.present) {
- err = platform_device_register(&bcma_sflash_dev);
- if (err)
- bcma_err(bus, "Error registering serial flash\n");
- }
-#endif
-
#ifdef CONFIG_BCMA_NFLASH
if (bus->drv_cc.nflash.present) {
err = platform_device_register(&bcma_nflash_dev);
@@ -413,6 +405,14 @@ int bcma_bus_register(struct bcma_bus *b
bcma_register_core(bus, core);
}
+#ifdef CONFIG_BCMA_SFLASH
+ if (bus->drv_cc.sflash.present) {
+ err = platform_device_register(&bcma_sflash_dev);
+ if (err)
+ bcma_err(bus, "Error registering serial flash\n");
+ }
+#endif
+
/* Try to get SPROM */
err = bcma_sprom_get(bus);
if (err == -ENOENT) {
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -14,6 +14,7 @@
#include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/cpu_pm.h>
+#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/clocksource.h>
#include <linux/interrupt.h>
@@ -934,6 +935,16 @@ static void arch_timer_of_configure_rate
if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
arch_timer_rate = rate;
+ /* Get clk rate through clk driver if present */
+ if (!arch_timer_rate) {
+ struct clk *clk = of_clk_get(np, 0);
+
+ if (!IS_ERR(clk)) {
+ if (!clk_prepare_enable(clk))
+ arch_timer_rate = clk_get_rate(clk);
+ }
+ }
+
/* Check the timer frequency. */
if (validate_timer_rate())
pr_warn("frequency not available\n");

View File

@ -16,7 +16,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -350,6 +350,14 @@ @@ -352,6 +352,14 @@
}; };
}; };
@ -31,7 +31,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
mdio: mdio@18003000 { mdio: mdio@18003000 {
compatible = "brcm,iproc-mdio"; compatible = "brcm,iproc-mdio";
reg = <0x18003000 0x8>; reg = <0x18003000 0x8>;
@@ -417,12 +425,12 @@ @@ -419,12 +427,12 @@
function = "spi"; function = "spi";
}; };

View File

@ -12,7 +12,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -392,6 +392,15 @@ @@ -394,6 +394,15 @@
reg = <0x18105000 0x1000>; reg = <0x18105000 0x1000>;
}; };

View File

@ -13,7 +13,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -252,6 +252,10 @@ @@ -254,6 +254,10 @@
reg = <0x00013000 0x1000>; reg = <0x00013000 0x1000>;
}; };

View File

@ -20,7 +20,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -265,7 +265,7 @@ @@ -267,7 +267,7 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
@ -29,7 +29,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
#usb-cells = <0>; #usb-cells = <0>;
compatible = "generic-ehci"; compatible = "generic-ehci";
@@ -287,7 +287,7 @@ @@ -289,7 +289,7 @@
}; };
}; };

View File

@ -18,7 +18,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -318,7 +318,7 @@ @@ -320,7 +320,7 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;

View File

@ -38,7 +38,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
}; };
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -428,7 +428,7 @@ @@ -430,7 +430,7 @@
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;

View File

@ -21,8 +21,8 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -482,7 +482,7 @@ @@ -485,7 +485,7 @@
#thermal-sensor-cells = <0>; };
}; };
- srab: srab@18007000 { - srab: srab@18007000 {

View File

@ -71,7 +71,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+}; +};
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -483,7 +483,7 @@ @@ -486,7 +486,7 @@
}; };
srab: ethernet-switch@18007000 { srab: ethernet-switch@18007000 {

View File

@ -155,7 +155,7 @@ Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
label = "lan4"; label = "lan4";
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -489,6 +489,10 @@ @@ -492,6 +492,10 @@
status = "disabled"; status = "disabled";
/* ports are defined in board DTS */ /* ports are defined in board DTS */

View File

@ -9,19 +9,21 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/arch/arm/boot/dts/bcm5301x.dtsi --- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi +++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -422,16 +422,12 @@ @@ -424,7 +424,7 @@
#size-cells = <1>; #size-cells = <1>;
cru@100 { cru@100 {
- compatible = "simple-bus"; - compatible = "simple-bus";
+ compatible = "syscon", "simple-mfd"; + compatible = "syscon", "simple-mfd";
reg = <0x100 0x1a4>; reg = <0x100 0x1a4>;
- ranges; ranges;
- #address-cells = <1>; #address-cells = <1>;
- #size-cells = <1>; @@ -450,10 +450,9 @@
"sata1", "sata2";
};
- pinctrl: pin-controller@1c0 { - pinctrl: pin-controller@1c0 {
+ pinctrl: pinctrl { + pinctrl: pin-controller {
compatible = "brcm,bcm4708-pinmux"; compatible = "brcm,bcm4708-pinmux";
- reg = <0x1c0 0x24>; - reg = <0x1c0 0x24>;
- reg-names = "cru_gpio_control"; - reg-names = "cru_gpio_control";

View File

@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -5432,8 +5432,7 @@ static inline void skb_gro_reset_offset( @@ -5435,8 +5435,7 @@ static inline void skb_gro_reset_offset(
NAPI_GRO_CB(skb)->frag0 = NULL; NAPI_GRO_CB(skb)->frag0 = NULL;
NAPI_GRO_CB(skb)->frag0_len = 0; NAPI_GRO_CB(skb)->frag0_len = 0;

View File

@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
IPC_SEM_IDS, sysvipc_sem_proc_show); IPC_SEM_IDS, sysvipc_sem_proc_show);
--- a/ipc/shm.c --- a/ipc/shm.c
+++ b/ipc/shm.c +++ b/ipc/shm.c
@@ -144,6 +144,8 @@ pure_initcall(ipc_ns_init); @@ -154,6 +154,8 @@ pure_initcall(ipc_ns_init);
void __init shm_init(void) void __init shm_init(void)
{ {

View File

@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include "vlan.h" #include "vlan.h"
#include "vlanproc.h" #include "vlanproc.h"
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
@@ -744,6 +749,27 @@ static int vlan_dev_get_iflink(const str @@ -747,6 +752,27 @@ static int vlan_dev_get_iflink(const str
return real_dev->ifindex; return real_dev->ifindex;
} }
@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops vlan_ethtool_ops = { static const struct ethtool_ops vlan_ethtool_ops = {
.get_link_ksettings = vlan_ethtool_get_link_ksettings, .get_link_ksettings = vlan_ethtool_get_link_ksettings,
.get_drvinfo = vlan_ethtool_get_drvinfo, .get_drvinfo = vlan_ethtool_get_drvinfo,
@@ -782,6 +808,9 @@ static const struct net_device_ops vlan_ @@ -785,6 +811,9 @@ static const struct net_device_ops vlan_
#endif #endif
.ndo_fix_features = vlan_dev_fix_features, .ndo_fix_features = vlan_dev_fix_features,
.ndo_get_iflink = vlan_dev_get_iflink, .ndo_get_iflink = vlan_dev_get_iflink,

View File

@ -157,7 +157,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
case RTN_THROW: case RTN_THROW:
case RTN_UNREACHABLE: case RTN_UNREACHABLE:
default: default:
@@ -4434,6 +4453,17 @@ static int ip6_pkt_prohibit_out(struct n @@ -4453,6 +4472,17 @@ static int ip6_pkt_prohibit_out(struct n
return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES);
} }
@ -175,7 +175,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
/* /*
* Allocate a dst for local (unicast / anycast) address. * Allocate a dst for local (unicast / anycast) address.
*/ */
@@ -4914,7 +4944,8 @@ static int rtm_to_fib6_config(struct sk_ @@ -4933,7 +4963,8 @@ static int rtm_to_fib6_config(struct sk_
if (rtm->rtm_type == RTN_UNREACHABLE || if (rtm->rtm_type == RTN_UNREACHABLE ||
rtm->rtm_type == RTN_BLACKHOLE || rtm->rtm_type == RTN_BLACKHOLE ||
rtm->rtm_type == RTN_PROHIBIT || rtm->rtm_type == RTN_PROHIBIT ||
@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
cfg->fc_flags |= RTF_REJECT; cfg->fc_flags |= RTF_REJECT;
if (rtm->rtm_type == RTN_LOCAL) if (rtm->rtm_type == RTN_LOCAL)
@@ -6037,6 +6068,8 @@ static int ip6_route_dev_notify(struct n @@ -6056,6 +6087,8 @@ static int ip6_route_dev_notify(struct n
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.ip6_prohibit_entry->dst.dev = dev; net->ipv6.ip6_prohibit_entry->dst.dev = dev;
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev); net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
#endif #endif
@@ -6048,6 +6081,7 @@ static int ip6_route_dev_notify(struct n @@ -6067,6 +6100,7 @@ static int ip6_route_dev_notify(struct n
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev); in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev); in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev); in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
#endif #endif
} }
@@ -6240,6 +6274,8 @@ static int __net_init ip6_route_net_init @@ -6259,6 +6293,8 @@ static int __net_init ip6_route_net_init
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
net->ipv6.fib6_has_custom_rules = false; net->ipv6.fib6_has_custom_rules = false;
@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template, net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
sizeof(*net->ipv6.ip6_prohibit_entry), sizeof(*net->ipv6.ip6_prohibit_entry),
GFP_KERNEL); GFP_KERNEL);
@@ -6250,11 +6286,21 @@ static int __net_init ip6_route_net_init @@ -6269,11 +6305,21 @@ static int __net_init ip6_route_net_init
ip6_template_metrics, true); ip6_template_metrics, true);
INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached); INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->rt6i_uncached);
@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
ip6_template_metrics, true); ip6_template_metrics, true);
@@ -6278,6 +6324,8 @@ out: @@ -6297,6 +6343,8 @@ out:
return ret; return ret;
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
out_ip6_prohibit_entry: out_ip6_prohibit_entry:
kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_prohibit_entry);
out_ip6_null_entry: out_ip6_null_entry:
@@ -6297,6 +6345,7 @@ static void __net_exit ip6_route_net_exi @@ -6316,6 +6364,7 @@ static void __net_exit ip6_route_net_exi
kfree(net->ipv6.ip6_null_entry); kfree(net->ipv6.ip6_null_entry);
#ifdef CONFIG_IPV6_MULTIPLE_TABLES #ifdef CONFIG_IPV6_MULTIPLE_TABLES
kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_prohibit_entry);
@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
kfree(net->ipv6.ip6_blk_hole_entry); kfree(net->ipv6.ip6_blk_hole_entry);
#endif #endif
dst_entries_destroy(&net->ipv6.ip6_dst_ops); dst_entries_destroy(&net->ipv6.ip6_dst_ops);
@@ -6374,6 +6423,9 @@ void __init ip6_route_init_special_entri @@ -6393,6 +6442,9 @@ void __init ip6_route_init_special_entri
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);

View File

@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__u16 tc_index; /* traffic control index */ __u16 tc_index; /* traffic control index */
--- a/net/core/dev.c --- a/net/core/dev.c
+++ b/net/core/dev.c +++ b/net/core/dev.c
@@ -5498,6 +5498,9 @@ static enum gro_result dev_gro_receive(s @@ -5501,6 +5501,9 @@ static enum gro_result dev_gro_receive(s
int same_flow; int same_flow;
int grow; int grow;
@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netif_elide_gro(skb->dev)) if (netif_elide_gro(skb->dev))
goto normal; goto normal;
@@ -7300,6 +7303,48 @@ static void __netdev_adjacent_dev_unlink @@ -7303,6 +7306,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower); &upper_dev->adj_list.lower);
} }
@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev, static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master, struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info, void *upper_priv, void *upper_info,
@@ -7350,6 +7395,7 @@ static int __netdev_upper_dev_link(struc @@ -7353,6 +7398,7 @@ static int __netdev_upper_dev_link(struc
if (ret) if (ret)
return ret; return ret;
@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info); &changeupper_info.info);
ret = notifier_to_errno(ret); ret = notifier_to_errno(ret);
@@ -7443,6 +7489,7 @@ void netdev_upper_dev_unlink(struct net_ @@ -7446,6 +7492,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev); __netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info); &changeupper_info.info);
@@ -8173,6 +8220,7 @@ int dev_set_mac_address(struct net_devic @@ -8176,6 +8223,7 @@ int dev_set_mac_address(struct net_devic
if (err) if (err)
return err; return err;
dev->addr_assign_type = NET_ADDR_SET; dev->addr_assign_type = NET_ADDR_SET;

View File

@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int netif_rx_internal(struct sk_buff *skb); static int netif_rx_internal(struct sk_buff *skb);
static int call_netdevice_notifiers_info(unsigned long val, static int call_netdevice_notifiers_info(unsigned long val,
@@ -5940,6 +5941,11 @@ void __napi_schedule(struct napi_struct @@ -5943,6 +5944,11 @@ void __napi_schedule(struct napi_struct
{ {
unsigned long flags; unsigned long flags;
@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
local_irq_save(flags); local_irq_save(flags);
____napi_schedule(this_cpu_ptr(&softnet_data), n); ____napi_schedule(this_cpu_ptr(&softnet_data), n);
local_irq_restore(flags); local_irq_restore(flags);
@@ -5991,6 +5997,10 @@ EXPORT_SYMBOL(napi_schedule_prep); @@ -5994,6 +6000,10 @@ EXPORT_SYMBOL(napi_schedule_prep);
*/ */
void __napi_schedule_irqoff(struct napi_struct *n) void __napi_schedule_irqoff(struct napi_struct *n)
{ {
@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!IS_ENABLED(CONFIG_PREEMPT_RT)) if (!IS_ENABLED(CONFIG_PREEMPT_RT))
____napi_schedule(this_cpu_ptr(&softnet_data), n); ____napi_schedule(this_cpu_ptr(&softnet_data), n);
else else
@@ -6255,9 +6265,89 @@ static void init_gro_hash(struct napi_st @@ -6258,9 +6268,89 @@ static void init_gro_hash(struct napi_st
napi->gro_bitmask = 0; napi->gro_bitmask = 0;
} }
@ -208,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INIT_LIST_HEAD(&napi->poll_list); INIT_LIST_HEAD(&napi->poll_list);
hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
napi->timer.function = napi_watchdog; napi->timer.function = napi_watchdog;
@@ -6274,6 +6364,7 @@ void netif_napi_add(struct net_device *d @@ -6277,6 +6367,7 @@ void netif_napi_add(struct net_device *d
#ifdef CONFIG_NETPOLL #ifdef CONFIG_NETPOLL
napi->poll_owner = -1; napi->poll_owner = -1;
#endif #endif
@ -216,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
set_bit(NAPI_STATE_SCHED, &napi->state); set_bit(NAPI_STATE_SCHED, &napi->state);
set_bit(NAPI_STATE_NPSVC, &napi->state); set_bit(NAPI_STATE_NPSVC, &napi->state);
list_add_rcu(&napi->dev_list, &dev->napi_list); list_add_rcu(&napi->dev_list, &dev->napi_list);
@@ -6314,6 +6405,7 @@ static void flush_gro_hash(struct napi_s @@ -6317,6 +6408,7 @@ static void flush_gro_hash(struct napi_s
void netif_napi_del(struct napi_struct *napi) void netif_napi_del(struct napi_struct *napi)
{ {
might_sleep(); might_sleep();
@ -224,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (napi_hash_del(napi)) if (napi_hash_del(napi))
synchronize_net(); synchronize_net();
list_del_init(&napi->dev_list); list_del_init(&napi->dev_list);
@@ -6326,50 +6418,18 @@ EXPORT_SYMBOL(netif_napi_del); @@ -6329,50 +6421,18 @@ EXPORT_SYMBOL(netif_napi_del);
static int napi_poll(struct napi_struct *n, struct list_head *repoll) static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{ {
@ -279,7 +279,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Some drivers may have called napi_schedule /* Some drivers may have called napi_schedule
* prior to exhausting their budget. * prior to exhausting their budget.
@@ -10349,6 +10409,10 @@ static int __init net_dev_init(void) @@ -10352,6 +10412,10 @@ static int __init net_dev_init(void)
sd->backlog.weight = weight_p; sd->backlog.weight = weight_p;
} }

View File

@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/** /**
* ata_build_rw_tf - Build ATA taskfile for given read/write request * ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile * @tf: Target ATA taskfile
@@ -5149,6 +5162,9 @@ struct ata_queued_cmd *ata_qc_new_init(s @@ -5151,6 +5164,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0) if (tag < 0)
return NULL; return NULL;
} }
@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
qc = __ata_qc_from_tag(ap, tag); qc = __ata_qc_from_tag(ap, tag);
qc->tag = qc->hw_tag = tag; qc->tag = qc->hw_tag = tag;
@@ -6085,6 +6101,9 @@ struct ata_port *ata_port_alloc(struct a @@ -6087,6 +6103,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1; ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1; ap->stats.idle_irq = 1;
#endif #endif
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
ata_sff_port_init(ap); ata_sff_port_init(ap);
return ap; return ap;
@@ -6120,6 +6139,12 @@ static void ata_host_release(struct kref @@ -6122,6 +6141,12 @@ static void ata_host_release(struct kref
kfree(ap->pmp_link); kfree(ap->pmp_link);
kfree(ap->slave_link); kfree(ap->slave_link);
@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
kfree(ap); kfree(ap);
host->ports[i] = NULL; host->ports[i] = NULL;
} }
@@ -6583,7 +6608,23 @@ int ata_host_register(struct ata_host *h @@ -6585,7 +6610,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1; host->ports[i]->local_port_no = i + 1;
} }

View File

@ -226,7 +226,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
} }
@@ -1306,6 +1331,7 @@ static int ocelot_port_attr_set(struct n @@ -1303,6 +1328,7 @@ static int ocelot_port_attr_set(struct n
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
struct ocelot_port *ocelot_port = netdev_priv(dev); struct ocelot_port *ocelot_port = netdev_priv(dev);
@ -234,7 +234,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err = 0; int err = 0;
switch (attr->id) { switch (attr->id) {
@@ -1317,8 +1343,8 @@ static int ocelot_port_attr_set(struct n @@ -1314,8 +1340,8 @@ static int ocelot_port_attr_set(struct n
ocelot_port_attr_ageing_set(ocelot_port, attr->u.ageing_time); ocelot_port_attr_ageing_set(ocelot_port, attr->u.ageing_time);
break; break;
case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING: case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING:
@ -245,7 +245,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED: case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED:
ocelot_port_attr_mc_set(ocelot_port, !attr->u.mc_disabled); ocelot_port_attr_mc_set(ocelot_port, !attr->u.mc_disabled);
@@ -1520,20 +1546,20 @@ static int ocelot_port_bridge_join(struc @@ -1517,20 +1543,20 @@ static int ocelot_port_bridge_join(struc
return 0; return 0;
} }
@ -273,7 +273,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
static void ocelot_set_aggr_pgids(struct ocelot *ocelot) static void ocelot_set_aggr_pgids(struct ocelot *ocelot)
@@ -1687,11 +1713,8 @@ static int ocelot_netdevice_port_event(s @@ -1684,11 +1710,8 @@ static int ocelot_netdevice_port_event(s
err = ocelot_port_bridge_join(ocelot_port, err = ocelot_port_bridge_join(ocelot_port,
info->upper_dev); info->upper_dev);
else else
@ -287,7 +287,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
if (netif_is_lag_master(info->upper_dev)) { if (netif_is_lag_master(info->upper_dev)) {
if (info->linking) if (info->linking)
@@ -2009,6 +2032,7 @@ int ocelot_probe_port(struct ocelot *oce @@ -2006,6 +2029,7 @@ int ocelot_probe_port(struct ocelot *oce
{ {
struct ocelot_port *ocelot_port; struct ocelot_port *ocelot_port;
struct net_device *dev; struct net_device *dev;
@ -295,7 +295,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err; int err;
dev = alloc_etherdev(sizeof(struct ocelot_port)); dev = alloc_etherdev(sizeof(struct ocelot_port));
@@ -2044,7 +2068,15 @@ int ocelot_probe_port(struct ocelot *oce @@ -2041,7 +2065,15 @@ int ocelot_probe_port(struct ocelot *oce
} }
/* Basic L2 initialization */ /* Basic L2 initialization */

View File

@ -236,7 +236,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return ret; return ret;
} }
@@ -1129,9 +1161,9 @@ static const struct net_device_ops ocelo @@ -1123,9 +1155,9 @@ static const struct net_device_ops ocelo
.ndo_get_phys_port_name = ocelot_port_get_phys_port_name, .ndo_get_phys_port_name = ocelot_port_get_phys_port_name,
.ndo_set_mac_address = ocelot_port_set_mac_address, .ndo_set_mac_address = ocelot_port_set_mac_address,
.ndo_get_stats64 = ocelot_get_stats64, .ndo_get_stats64 = ocelot_get_stats64,

View File

@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
default: default:
return -ERANGE; return -ERANGE;
@@ -1136,8 +1136,9 @@ static int ocelot_hwstamp_set(struct oce @@ -1130,8 +1130,9 @@ static int ocelot_hwstamp_set(struct oce
static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{ {
@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* The function is only used for PTP operations for now */ /* The function is only used for PTP operations for now */
if (!ocelot->ptp) if (!ocelot->ptp)
@@ -1145,9 +1146,9 @@ static int ocelot_ioctl(struct net_devic @@ -1139,9 +1140,9 @@ static int ocelot_ioctl(struct net_devic
switch (cmd) { switch (cmd) {
case SIOCSHWTSTAMP: case SIOCSHWTSTAMP:

View File

@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1285,26 +1285,20 @@ static const struct ethtool_ops ocelot_e @@ -1282,26 +1282,20 @@ static const struct ethtool_ops ocelot_e
.get_ts_info = ocelot_get_ts_info, .get_ts_info = ocelot_get_ts_info,
}; };
@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Fallthrough */ /* Fallthrough */
case BR_STATE_LEARNING: case BR_STATE_LEARNING:
port_cfg |= ANA_PORT_PORT_CFG_LEARN_ENA; port_cfg |= ANA_PORT_PORT_CFG_LEARN_ENA;
@@ -1312,19 +1306,18 @@ static int ocelot_port_attr_stp_state_se @@ -1309,19 +1303,18 @@ static int ocelot_port_attr_stp_state_se
default: default:
port_cfg &= ~ANA_PORT_PORT_CFG_LEARN_ENA; port_cfg &= ~ANA_PORT_PORT_CFG_LEARN_ENA;
@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (i = 0; i < ocelot->num_phys_ports; i++) { for (i = 0; i < ocelot->num_phys_ports; i++) {
unsigned long bond_mask = ocelot->lags[i]; unsigned long bond_mask = ocelot->lags[i];
@@ -1332,7 +1325,7 @@ static int ocelot_port_attr_stp_state_se @@ -1329,7 +1322,7 @@ static int ocelot_port_attr_stp_state_se
if (!bond_mask) if (!bond_mask)
continue; continue;
@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mask &= ~bond_mask; mask &= ~bond_mask;
break; break;
} }
@@ -1340,47 +1333,55 @@ static int ocelot_port_attr_stp_state_se @@ -1337,47 +1330,55 @@ static int ocelot_port_attr_stp_state_se
ocelot_write_rix(ocelot, ocelot_write_rix(ocelot,
BIT(ocelot->num_phys_ports) | mask, BIT(ocelot->num_phys_ports) | mask,
@ -162,7 +162,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
static int ocelot_port_attr_set(struct net_device *dev, static int ocelot_port_attr_set(struct net_device *dev,
@@ -1389,22 +1390,23 @@ static int ocelot_port_attr_set(struct n @@ -1386,22 +1387,23 @@ static int ocelot_port_attr_set(struct n
{ {
struct ocelot_port *ocelot_port = netdev_priv(dev); struct ocelot_port *ocelot_port = netdev_priv(dev);
struct ocelot *ocelot = ocelot_port->ocelot; struct ocelot *ocelot = ocelot_port->ocelot;

View File

@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
} }
@@ -1586,11 +1586,9 @@ static int ocelot_port_obj_del(struct ne @@ -1583,11 +1583,9 @@ static int ocelot_port_obj_del(struct ne
return ret; return ret;
} }
@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!ocelot->bridge_mask) { if (!ocelot->bridge_mask) {
ocelot->hw_bridge_dev = bridge; ocelot->hw_bridge_dev = bridge;
} else { } else {
@@ -1600,17 +1598,14 @@ static int ocelot_port_bridge_join(struc @@ -1597,17 +1595,14 @@ static int ocelot_port_bridge_join(struc
return -ENODEV; return -ENODEV;
} }
@ -116,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ocelot->bridge_mask &= ~BIT(port); ocelot->bridge_mask &= ~BIT(port);
if (!ocelot->bridge_mask) if (!ocelot->bridge_mask)
@@ -1679,14 +1674,12 @@ static void ocelot_setup_lag(struct ocel @@ -1676,14 +1671,12 @@ static void ocelot_setup_lag(struct ocel
} }
} }
@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rcu_read_lock(); rcu_read_lock();
for_each_netdev_in_bond_rcu(bond, ndev) { for_each_netdev_in_bond_rcu(bond, ndev) {
@@ -1701,17 +1694,17 @@ static int ocelot_port_lag_join(struct o @@ -1698,17 +1691,17 @@ static int ocelot_port_lag_join(struct o
/* If the new port is the lowest one, use it as the logical port from /* If the new port is the lowest one, use it as the logical port from
* now on * now on
*/ */
@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
ocelot_setup_lag(ocelot, lag); ocelot_setup_lag(ocelot, lag);
@@ -1720,34 +1713,32 @@ static int ocelot_port_lag_join(struct o @@ -1717,34 +1710,32 @@ static int ocelot_port_lag_join(struct o
return 0; return 0;
} }
@ -200,7 +200,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ocelot_set_aggr_pgids(ocelot); ocelot_set_aggr_pgids(ocelot);
} }
@@ -1763,24 +1754,26 @@ static int ocelot_netdevice_port_event(s @@ -1760,24 +1751,26 @@ static int ocelot_netdevice_port_event(s
struct netdev_notifier_changeupper_info *info) struct netdev_notifier_changeupper_info *info)
{ {
struct ocelot_port *ocelot_port = netdev_priv(dev); struct ocelot_port *ocelot_port = netdev_priv(dev);
@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
info->upper_dev); info->upper_dev);
} }
break; break;
@@ -2138,7 +2131,7 @@ int ocelot_probe_port(struct ocelot *oce @@ -2135,7 +2128,7 @@ int ocelot_probe_port(struct ocelot *oce
REW_PORT_VLAN_CFG, port); REW_PORT_VLAN_CFG, port);
/* Enable vcap lookups */ /* Enable vcap lookups */

View File

@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ppid->id_len = sizeof(ocelot->base_mac); ppid->id_len = sizeof(ocelot->base_mac);
memcpy(&ppid->id, &ocelot->base_mac, ppid->id_len); memcpy(&ppid->id, &ocelot->base_mac, ppid->id_len);
@@ -1136,9 +1154,9 @@ static int ocelot_hwstamp_set(struct oce @@ -1130,9 +1148,9 @@ static int ocelot_hwstamp_set(struct oce
static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) static int ocelot_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{ {
@ -531,7 +531,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* The function is only used for PTP operations for now */ /* The function is only used for PTP operations for now */
if (!ocelot->ptp) if (!ocelot->ptp)
@@ -1175,8 +1193,8 @@ static const struct net_device_ops ocelo @@ -1169,8 +1187,8 @@ static const struct net_device_ops ocelo
static void ocelot_get_strings(struct net_device *netdev, u32 sset, u8 *data) static void ocelot_get_strings(struct net_device *netdev, u32 sset, u8 *data)
{ {
@ -542,7 +542,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
if (sset != ETH_SS_STATS) if (sset != ETH_SS_STATS)
@@ -1230,8 +1248,9 @@ static void ocelot_check_stats_work(stru @@ -1224,8 +1242,9 @@ static void ocelot_check_stats_work(stru
static void ocelot_get_ethtool_stats(struct net_device *dev, static void ocelot_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
/* check and update now */ /* check and update now */
@@ -1239,13 +1258,13 @@ static void ocelot_get_ethtool_stats(str @@ -1233,13 +1252,13 @@ static void ocelot_get_ethtool_stats(str
/* Copy all counters */ /* Copy all counters */
for (i = 0; i < ocelot->num_stats; i++) for (i = 0; i < ocelot->num_stats; i++)
@ -571,7 +571,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (sset != ETH_SS_STATS) if (sset != ETH_SS_STATS)
return -EOPNOTSUPP; return -EOPNOTSUPP;
@@ -1255,8 +1274,8 @@ static int ocelot_get_sset_count(struct @@ -1249,8 +1268,8 @@ static int ocelot_get_sset_count(struct
static int ocelot_get_ts_info(struct net_device *dev, static int ocelot_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info) struct ethtool_ts_info *info)
{ {
@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!ocelot->ptp) if (!ocelot->ptp)
return ethtool_op_get_ts_info(dev, info); return ethtool_op_get_ts_info(dev, info);
@@ -1388,9 +1407,9 @@ static int ocelot_port_attr_set(struct n @@ -1385,9 +1404,9 @@ static int ocelot_port_attr_set(struct n
const struct switchdev_attr *attr, const struct switchdev_attr *attr,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
@ -595,7 +595,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err = 0; int err = 0;
switch (attr->id) { switch (attr->id) {
@@ -1402,8 +1421,8 @@ static int ocelot_port_attr_set(struct n @@ -1399,8 +1418,8 @@ static int ocelot_port_attr_set(struct n
ocelot_port_attr_ageing_set(ocelot, port, attr->u.ageing_time); ocelot_port_attr_ageing_set(ocelot, port, attr->u.ageing_time);
break; break;
case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING: case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING:
@ -606,7 +606,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED: case SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED:
ocelot_port_attr_mc_set(ocelot, port, !attr->u.mc_disabled); ocelot_port_attr_mc_set(ocelot, port, !attr->u.mc_disabled);
@@ -1468,15 +1487,17 @@ static int ocelot_port_obj_add_mdb(struc @@ -1465,15 +1484,17 @@ static int ocelot_port_obj_add_mdb(struc
const struct switchdev_obj_port_mdb *mdb, const struct switchdev_obj_port_mdb *mdb,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
@ -628,7 +628,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mc = ocelot_multicast_get(ocelot, mdb->addr, vid); mc = ocelot_multicast_get(ocelot, mdb->addr, vid);
if (!mc) { if (!mc) {
@@ -1500,7 +1521,7 @@ static int ocelot_port_obj_add_mdb(struc @@ -1497,7 +1518,7 @@ static int ocelot_port_obj_add_mdb(struc
ocelot_mact_forget(ocelot, addr, vid); ocelot_mact_forget(ocelot, addr, vid);
} }
@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
addr[2] = mc->ports << 0; addr[2] = mc->ports << 0;
addr[1] = mc->ports << 8; addr[1] = mc->ports << 8;
@@ -1510,14 +1531,16 @@ static int ocelot_port_obj_add_mdb(struc @@ -1507,14 +1528,16 @@ static int ocelot_port_obj_add_mdb(struc
static int ocelot_port_obj_del_mdb(struct net_device *dev, static int ocelot_port_obj_del_mdb(struct net_device *dev,
const struct switchdev_obj_port_mdb *mdb) const struct switchdev_obj_port_mdb *mdb)
{ {
@ -658,7 +658,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mc = ocelot_multicast_get(ocelot, mdb->addr, vid); mc = ocelot_multicast_get(ocelot, mdb->addr, vid);
if (!mc) if (!mc)
@@ -1529,7 +1552,7 @@ static int ocelot_port_obj_del_mdb(struc @@ -1526,7 +1549,7 @@ static int ocelot_port_obj_del_mdb(struc
addr[0] = 0; addr[0] = 0;
ocelot_mact_forget(ocelot, addr, vid); ocelot_mact_forget(ocelot, addr, vid);
@ -667,7 +667,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!mc->ports) { if (!mc->ports) {
list_del(&mc->list); list_del(&mc->list);
devm_kfree(ocelot->dev, mc); devm_kfree(ocelot->dev, mc);
@@ -1683,9 +1706,9 @@ static int ocelot_port_lag_join(struct o @@ -1680,9 +1703,9 @@ static int ocelot_port_lag_join(struct o
rcu_read_lock(); rcu_read_lock();
for_each_netdev_in_bond_rcu(bond, ndev) { for_each_netdev_in_bond_rcu(bond, ndev) {
@ -679,7 +679,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
rcu_read_unlock(); rcu_read_unlock();
@@ -1753,20 +1776,23 @@ static int ocelot_netdevice_port_event(s @@ -1750,20 +1773,23 @@ static int ocelot_netdevice_port_event(s
unsigned long event, unsigned long event,
struct netdev_notifier_changeupper_info *info) struct netdev_notifier_changeupper_info *info)
{ {
@ -707,7 +707,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
if (netif_is_lag_master(info->upper_dev)) { if (netif_is_lag_master(info->upper_dev)) {
if (info->linking) if (info->linking)
@@ -2082,21 +2108,23 @@ int ocelot_probe_port(struct ocelot *oce @@ -2079,21 +2105,23 @@ int ocelot_probe_port(struct ocelot *oce
void __iomem *regs, void __iomem *regs,
struct phy_device *phy) struct phy_device *phy)
{ {

View File

@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1191,10 +1191,9 @@ static const struct net_device_ops ocelo @@ -1185,10 +1185,9 @@ static const struct net_device_ops ocelo
.ndo_do_ioctl = ocelot_ioctl, .ndo_do_ioctl = ocelot_ioctl,
}; };
@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
if (sset != ETH_SS_STATS) if (sset != ETH_SS_STATS)
@@ -1205,6 +1204,16 @@ static void ocelot_get_strings(struct ne @@ -1199,6 +1198,16 @@ static void ocelot_get_strings(struct ne
ETH_GSTRING_LEN); ETH_GSTRING_LEN);
} }
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_update_stats(struct ocelot *ocelot) static void ocelot_update_stats(struct ocelot *ocelot)
{ {
int i, j; int i, j;
@@ -1245,12 +1254,8 @@ static void ocelot_check_stats_work(stru @@ -1239,12 +1248,8 @@ static void ocelot_check_stats_work(stru
OCELOT_STATS_CHECK_DELAY); OCELOT_STATS_CHECK_DELAY);
} }
@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
/* check and update now */ /* check and update now */
@@ -1261,25 +1266,37 @@ static void ocelot_get_ethtool_stats(str @@ -1255,25 +1260,37 @@ static void ocelot_get_ethtool_stats(str
*data++ = ocelot->stats[port * ocelot->num_stats + i]; *data++ = ocelot->stats[port * ocelot->num_stats + i];
} }
@ -100,7 +100,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
info->phc_index = ocelot->ptp_clock ? info->phc_index = ocelot->ptp_clock ?
ptp_clock_index(ocelot->ptp_clock) : -1; ptp_clock_index(ocelot->ptp_clock) : -1;
info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE | info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
@@ -1295,13 +1312,26 @@ static int ocelot_get_ts_info(struct net @@ -1292,13 +1309,26 @@ static int ocelot_get_ts_info(struct net
return 0; return 0;
} }

View File

@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2135,6 +2135,28 @@ static int ocelot_init_timestamp(struct @@ -2132,6 +2132,28 @@ static int ocelot_init_timestamp(struct
return 0; return 0;
} }
@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int ocelot_probe_port(struct ocelot *ocelot, u8 port, int ocelot_probe_port(struct ocelot *ocelot, u8 port,
void __iomem *regs, void __iomem *regs,
struct phy_device *phy) struct phy_device *phy)
@@ -2142,7 +2164,6 @@ int ocelot_probe_port(struct ocelot *oce @@ -2139,7 +2161,6 @@ int ocelot_probe_port(struct ocelot *oce
struct ocelot_port_private *priv; struct ocelot_port_private *priv;
struct ocelot_port *ocelot_port; struct ocelot_port *ocelot_port;
struct net_device *dev; struct net_device *dev;
@ -52,7 +52,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err; int err;
dev = alloc_etherdev(sizeof(struct ocelot_port_private)); dev = alloc_etherdev(sizeof(struct ocelot_port_private));
@@ -2170,32 +2191,14 @@ int ocelot_probe_port(struct ocelot *oce @@ -2167,32 +2188,14 @@ int ocelot_probe_port(struct ocelot *oce
ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr, ocelot_port->pvid, ocelot_mact_learn(ocelot, PGID_CPU, dev->dev_addr, ocelot_port->pvid,
ENTRYTYPE_LOCKED); ENTRYTYPE_LOCKED);

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2245,6 +2245,7 @@ int ocelot_init(struct ocelot *ocelot) @@ -2242,6 +2242,7 @@ int ocelot_init(struct ocelot *ocelot)
if (!ocelot->stats_queue) if (!ocelot->stats_queue)
return -ENOMEM; return -ENOMEM;

View File

@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Set vlan ingress filter mask to all ports but the CPU port by /* Set vlan ingress filter mask to all ports but the CPU port by
* default. * default.
*/ */
@@ -2226,11 +2220,52 @@ int ocelot_probe_port(struct ocelot *oce @@ -2223,11 +2217,52 @@ int ocelot_probe_port(struct ocelot *oce
} }
EXPORT_SYMBOL(ocelot_probe_port); EXPORT_SYMBOL(ocelot_probe_port);
@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ocelot->lags = devm_kcalloc(ocelot->dev, ocelot->num_phys_ports, ocelot->lags = devm_kcalloc(ocelot->dev, ocelot->num_phys_ports,
sizeof(u32), GFP_KERNEL); sizeof(u32), GFP_KERNEL);
@@ -2310,13 +2345,6 @@ int ocelot_init(struct ocelot *ocelot) @@ -2307,13 +2342,6 @@ int ocelot_init(struct ocelot *ocelot)
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_SRC + port); ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_SRC + port);
} }
@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Allow broadcast MAC frames. */ /* Allow broadcast MAC frames. */
for (i = ocelot->num_phys_ports + 1; i < PGID_CPU; i++) { for (i = ocelot->num_phys_ports + 1; i < PGID_CPU; i++) {
u32 val = ANA_PGID_PGID_PGID(GENMASK(ocelot->num_phys_ports - 1, 0)); u32 val = ANA_PGID_PGID_PGID(GENMASK(ocelot->num_phys_ports - 1, 0));
@@ -2329,13 +2357,6 @@ int ocelot_init(struct ocelot *ocelot) @@ -2326,13 +2354,6 @@ int ocelot_init(struct ocelot *ocelot)
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV4); ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV4);
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV6); ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV6);

View File

@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1383,7 +1383,7 @@ static void ocelot_bridge_stp_state_set( @@ -1380,7 +1380,7 @@ static void ocelot_bridge_stp_state_set(
* a source for the other ports. * a source for the other ports.
*/ */
for (p = 0; p < ocelot->num_phys_ports; p++) { for (p = 0; p < ocelot->num_phys_ports; p++) {
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
unsigned long mask = ocelot->bridge_fwd_mask & ~BIT(p); unsigned long mask = ocelot->bridge_fwd_mask & ~BIT(p);
for (i = 0; i < ocelot->num_phys_ports; i++) { for (i = 0; i < ocelot->num_phys_ports; i++) {
@@ -1398,15 +1398,18 @@ static void ocelot_bridge_stp_state_set( @@ -1395,15 +1395,18 @@ static void ocelot_bridge_stp_state_set(
} }
} }

View File

@ -98,7 +98,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
static void ocelot_port_adjust_link(struct net_device *dev) static void ocelot_port_adjust_link(struct net_device *dev)
@@ -2143,11 +2102,53 @@ static int ocelot_init_timestamp(struct @@ -2140,11 +2099,53 @@ static int ocelot_init_timestamp(struct
static void ocelot_init_port(struct ocelot *ocelot, int port) static void ocelot_init_port(struct ocelot *ocelot, int port)
{ {
struct ocelot_port *ocelot_port = ocelot->ports[port]; struct ocelot_port *ocelot_port = ocelot->ports[port];

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2099,11 +2099,32 @@ static int ocelot_init_timestamp(struct @@ -2096,11 +2096,32 @@ static int ocelot_init_timestamp(struct
return 0; return 0;
} }
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
INIT_LIST_HEAD(&ocelot_port->skbs); INIT_LIST_HEAD(&ocelot_port->skbs);
/* Basic L2 initialization */ /* Basic L2 initialization */
@@ -2124,8 +2145,7 @@ static void ocelot_init_port(struct ocel @@ -2121,8 +2142,7 @@ static void ocelot_init_port(struct ocel
DEV_MAC_HDX_CFG); DEV_MAC_HDX_CFG);
/* Set Max Length and maximum tags allowed */ /* Set Max Length and maximum tags allowed */
@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ocelot_port_writel(ocelot_port, DEV_MAC_TAGS_CFG_TAG_ID(ETH_P_8021AD) | ocelot_port_writel(ocelot_port, DEV_MAC_TAGS_CFG_TAG_ID(ETH_P_8021AD) |
DEV_MAC_TAGS_CFG_VLAN_AWR_ENA | DEV_MAC_TAGS_CFG_VLAN_AWR_ENA |
DEV_MAC_TAGS_CFG_VLAN_LEN_AWR_ENA, DEV_MAC_TAGS_CFG_VLAN_LEN_AWR_ENA,
@@ -2135,20 +2155,6 @@ static void ocelot_init_port(struct ocel @@ -2132,20 +2152,6 @@ static void ocelot_init_port(struct ocel
ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_HIGH_CFG); ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_HIGH_CFG);
ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_LOW_CFG); ocelot_port_writel(ocelot_port, 0, DEV_MAC_FC_MAC_LOW_CFG);

View File

@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2232,9 +2232,18 @@ void ocelot_set_cpu_port(struct ocelot * @@ -2229,9 +2229,18 @@ void ocelot_set_cpu_port(struct ocelot *
* Only one port can be an NPI at the same time. * Only one port can be an NPI at the same time.
*/ */
if (cpu < ocelot->num_phys_ports) { if (cpu < ocelot->num_phys_ports) {

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2271,6 +2271,14 @@ int ocelot_init(struct ocelot *ocelot) @@ -2268,6 +2268,14 @@ int ocelot_init(struct ocelot *ocelot)
int i, ret; int i, ret;
u32 port; u32 port;

View File

@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int ocelot_port_fdb_dump(struct sk_buff *skb, static int ocelot_port_fdb_dump(struct sk_buff *skb,
struct netlink_callback *cb, struct netlink_callback *cb,
@@ -1153,8 +1160,7 @@ static const struct net_device_ops ocelo @@ -1147,8 +1154,7 @@ static const struct net_device_ops ocelo
.ndo_do_ioctl = ocelot_ioctl, .ndo_do_ioctl = ocelot_ioctl,
}; };
@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
int i; int i;
@@ -1165,6 +1171,7 @@ static void ocelot_get_strings(struct oc @@ -1159,6 +1165,7 @@ static void ocelot_get_strings(struct oc
memcpy(data + i * ETH_GSTRING_LEN, ocelot->stats_layout[i].name, memcpy(data + i * ETH_GSTRING_LEN, ocelot->stats_layout[i].name,
ETH_GSTRING_LEN); ETH_GSTRING_LEN);
} }
@ -213,7 +213,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_port_get_strings(struct net_device *netdev, u32 sset, static void ocelot_port_get_strings(struct net_device *netdev, u32 sset,
u8 *data) u8 *data)
@@ -1216,7 +1223,7 @@ static void ocelot_check_stats_work(stru @@ -1210,7 +1217,7 @@ static void ocelot_check_stats_work(stru
OCELOT_STATS_CHECK_DELAY); OCELOT_STATS_CHECK_DELAY);
} }
@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
int i; int i;
@@ -1227,6 +1234,7 @@ static void ocelot_get_ethtool_stats(str @@ -1221,6 +1228,7 @@ static void ocelot_get_ethtool_stats(str
for (i = 0; i < ocelot->num_stats; i++) for (i = 0; i < ocelot->num_stats; i++)
*data++ = ocelot->stats[port * ocelot->num_stats + i]; *data++ = ocelot->stats[port * ocelot->num_stats + i];
} }
@ -230,7 +230,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_port_get_ethtool_stats(struct net_device *dev, static void ocelot_port_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, struct ethtool_stats *stats,
@@ -1239,13 +1247,14 @@ static void ocelot_port_get_ethtool_stat @@ -1233,13 +1241,14 @@ static void ocelot_port_get_ethtool_stat
ocelot_get_ethtool_stats(ocelot, port, data); ocelot_get_ethtool_stats(ocelot, port, data);
} }
@ -246,7 +246,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int ocelot_port_get_sset_count(struct net_device *dev, int sset) static int ocelot_port_get_sset_count(struct net_device *dev, int sset)
{ {
@@ -1256,8 +1265,8 @@ static int ocelot_port_get_sset_count(st @@ -1250,8 +1259,8 @@ static int ocelot_port_get_sset_count(st
return ocelot_get_sset_count(ocelot, port, sset); return ocelot_get_sset_count(ocelot, port, sset);
} }
@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
info->phc_index = ocelot->ptp_clock ? info->phc_index = ocelot->ptp_clock ?
ptp_clock_index(ocelot->ptp_clock) : -1; ptp_clock_index(ocelot->ptp_clock) : -1;
@@ -1273,6 +1282,7 @@ static int ocelot_get_ts_info(struct oce @@ -1270,6 +1279,7 @@ static int ocelot_get_ts_info(struct oce
return 0; return 0;
} }
@ -265,7 +265,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int ocelot_port_get_ts_info(struct net_device *dev, static int ocelot_port_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info) struct ethtool_ts_info *info)
@@ -1296,8 +1306,7 @@ static const struct ethtool_ops ocelot_e @@ -1293,8 +1303,7 @@ static const struct ethtool_ops ocelot_e
.get_ts_info = ocelot_port_get_ts_info, .get_ts_info = ocelot_port_get_ts_info,
}; };
@ -275,7 +275,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
u32 port_cfg; u32 port_cfg;
int p, i; int p, i;
@@ -1358,6 +1367,7 @@ static void ocelot_bridge_stp_state_set( @@ -1355,6 +1364,7 @@ static void ocelot_bridge_stp_state_set(
} }
} }
} }
@ -283,7 +283,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_port_attr_stp_state_set(struct ocelot *ocelot, int port, static void ocelot_port_attr_stp_state_set(struct ocelot *ocelot, int port,
struct switchdev_trans *trans, struct switchdev_trans *trans,
@@ -1369,11 +1379,12 @@ static void ocelot_port_attr_stp_state_s @@ -1366,11 +1376,12 @@ static void ocelot_port_attr_stp_state_s
ocelot_bridge_stp_state_set(ocelot, port, state); ocelot_bridge_stp_state_set(ocelot, port, state);
} }
@ -297,7 +297,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_port_attr_ageing_set(struct ocelot *ocelot, int port, static void ocelot_port_attr_ageing_set(struct ocelot *ocelot, int port,
unsigned long ageing_clock_t) unsigned long ageing_clock_t)
@@ -1604,8 +1615,8 @@ static int ocelot_port_obj_del(struct ne @@ -1601,8 +1612,8 @@ static int ocelot_port_obj_del(struct ne
return ret; return ret;
} }
@ -308,7 +308,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
if (!ocelot->bridge_mask) { if (!ocelot->bridge_mask) {
ocelot->hw_bridge_dev = bridge; ocelot->hw_bridge_dev = bridge;
@@ -1620,9 +1631,10 @@ static int ocelot_port_bridge_join(struc @@ -1617,9 +1628,10 @@ static int ocelot_port_bridge_join(struc
return 0; return 0;
} }
@ -321,7 +321,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
ocelot->bridge_mask &= ~BIT(port); ocelot->bridge_mask &= ~BIT(port);
@@ -1633,6 +1645,7 @@ static int ocelot_port_bridge_leave(stru @@ -1630,6 +1642,7 @@ static int ocelot_port_bridge_leave(stru
ocelot_port_set_pvid(ocelot, port, 0); ocelot_port_set_pvid(ocelot, port, 0);
return ocelot_port_set_native_vlan(ocelot, port, 0); return ocelot_port_set_native_vlan(ocelot, port, 0);
} }
@ -329,7 +329,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ocelot_set_aggr_pgids(struct ocelot *ocelot) static void ocelot_set_aggr_pgids(struct ocelot *ocelot)
{ {
@@ -2121,7 +2134,7 @@ static void ocelot_port_set_mtu(struct o @@ -2118,7 +2131,7 @@ static void ocelot_port_set_mtu(struct o
ocelot_write(ocelot, ocelot_wm_enc(atop_wm), SYS_ATOP_TOT_CFG); ocelot_write(ocelot, ocelot_wm_enc(atop_wm), SYS_ATOP_TOT_CFG);
} }
@ -338,7 +338,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
struct ocelot_port *ocelot_port = ocelot->ports[port]; struct ocelot_port *ocelot_port = ocelot->ports[port];
@@ -2168,6 +2181,7 @@ static void ocelot_init_port(struct ocel @@ -2165,6 +2178,7 @@ static void ocelot_init_port(struct ocel
/* Enable vcap lookups */ /* Enable vcap lookups */
ocelot_vcap_enable(ocelot, port); ocelot_vcap_enable(ocelot, port);
} }

View File

@ -36,7 +36,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{ {
struct ocelot_port *ocelot_port = ocelot->ports[port]; struct ocelot_port *ocelot_port = ocelot->ports[port];
struct hwtstamp_config cfg; struct hwtstamp_config cfg;
@@ -1120,6 +1119,7 @@ static int ocelot_hwstamp_set(struct oce @@ -1114,6 +1113,7 @@ static int ocelot_hwstamp_set(struct oce
return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0; return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0;
} }

View File

@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
} }
EXPORT_SYMBOL(ocelot_get_txtstamp); EXPORT_SYMBOL(ocelot_get_txtstamp);
@@ -2208,7 +2199,7 @@ void ocelot_init_port(struct ocelot *oce @@ -2205,7 +2196,7 @@ void ocelot_init_port(struct ocelot *oce
{ {
struct ocelot_port *ocelot_port = ocelot->ports[port]; struct ocelot_port *ocelot_port = ocelot->ports[port];
@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Basic L2 initialization */ /* Basic L2 initialization */
@@ -2493,9 +2484,7 @@ EXPORT_SYMBOL(ocelot_init); @@ -2490,9 +2481,7 @@ EXPORT_SYMBOL(ocelot_init);
void ocelot_deinit(struct ocelot *ocelot) void ocelot_deinit(struct ocelot *ocelot)
{ {
@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i; int i;
cancel_delayed_work(&ocelot->stats_work); cancel_delayed_work(&ocelot->stats_work);
@@ -2507,14 +2496,7 @@ void ocelot_deinit(struct ocelot *ocelot @@ -2504,14 +2493,7 @@ void ocelot_deinit(struct ocelot *ocelot
for (i = 0; i < ocelot->num_phys_ports; i++) { for (i = 0; i < ocelot->num_phys_ports; i++) {
port = ocelot->ports[i]; port = ocelot->ports[i];

View File

@ -41,7 +41,7 @@ Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
ocelot_write_rix(ocelot, val, ANA_PGID_PGID, i); ocelot_write_rix(ocelot, val, ANA_PGID_PGID, i);
__dev_mc_sync(dev, ocelot_mc_sync, ocelot_mc_unsync); __dev_mc_sync(dev, ocelot_mc_sync, ocelot_mc_unsync);
@@ -2410,10 +2410,11 @@ int ocelot_init(struct ocelot *ocelot) @@ -2407,10 +2407,11 @@ int ocelot_init(struct ocelot *ocelot)
SYS_FRM_AGING_MAX_AGE(307692), SYS_FRM_AGING); SYS_FRM_AGING_MAX_AGE(307692), SYS_FRM_AGING);
/* Setup flooding PGIDs */ /* Setup flooding PGIDs */

View File

@ -14,7 +14,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2340,6 +2340,20 @@ void ocelot_set_cpu_port(struct ocelot * @@ -2337,6 +2337,20 @@ void ocelot_set_cpu_port(struct ocelot *
} }
EXPORT_SYMBOL(ocelot_set_cpu_port); EXPORT_SYMBOL(ocelot_set_cpu_port);
@ -35,7 +35,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
int ocelot_init(struct ocelot *ocelot) int ocelot_init(struct ocelot *ocelot)
{ {
char queue_name[32]; char queue_name[32];
@@ -2477,6 +2491,13 @@ int ocelot_init(struct ocelot *ocelot) @@ -2474,6 +2488,13 @@ int ocelot_init(struct ocelot *ocelot)
"Timestamp initialization failed\n"); "Timestamp initialization failed\n");
return ret; return ret;
} }
@ -49,7 +49,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
} }
return 0; return 0;
@@ -2491,6 +2512,8 @@ void ocelot_deinit(struct ocelot *ocelot @@ -2488,6 +2509,8 @@ void ocelot_deinit(struct ocelot *ocelot
cancel_delayed_work(&ocelot->stats_work); cancel_delayed_work(&ocelot->stats_work);
destroy_workqueue(ocelot->stats_queue); destroy_workqueue(ocelot->stats_queue);
mutex_destroy(&ocelot->stats_lock); mutex_destroy(&ocelot->stats_lock);

View File

@ -128,7 +128,7 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2294,6 +2294,18 @@ void ocelot_set_cpu_port(struct ocelot * @@ -2291,6 +2291,18 @@ void ocelot_set_cpu_port(struct ocelot *
enum ocelot_tag_prefix injection, enum ocelot_tag_prefix injection,
enum ocelot_tag_prefix extraction) enum ocelot_tag_prefix extraction)
{ {

View File

@ -15,7 +15,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
--- a/drivers/net/ethernet/mscc/ocelot.c --- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1680,6 +1680,8 @@ static int ocelot_port_obj_del(struct ne @@ -1677,6 +1677,8 @@ static int ocelot_port_obj_del(struct ne
int ocelot_port_bridge_join(struct ocelot *ocelot, int port, int ocelot_port_bridge_join(struct ocelot *ocelot, int port,
struct net_device *bridge) struct net_device *bridge)
{ {
@ -24,7 +24,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
if (!ocelot->bridge_mask) { if (!ocelot->bridge_mask) {
ocelot->hw_bridge_dev = bridge; ocelot->hw_bridge_dev = bridge;
} else { } else {
@@ -1691,6 +1693,12 @@ int ocelot_port_bridge_join(struct ocelo @@ -1688,6 +1690,12 @@ int ocelot_port_bridge_join(struct ocelo
ocelot->bridge_mask |= BIT(port); ocelot->bridge_mask |= BIT(port);

View File

@ -24,7 +24,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci-hub.c --- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c
@@ -1421,6 +1421,15 @@ int xhci_hub_control(struct usb_hcd *hcd @@ -1422,6 +1422,15 @@ int xhci_hub_control(struct usb_hcd *hcd
/* 4.19.6 Port Test Modes (USB2 Test Mode) */ /* 4.19.6 Port Test Modes (USB2 Test Mode) */
if (hcd->speed != HCD_USB2) if (hcd->speed != HCD_USB2)
goto error; goto error;
@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
retval = xhci_enter_test_mode(xhci, test_mode, wIndex, retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
--- a/drivers/usb/host/xhci-ring.c --- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c
@@ -3630,6 +3630,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * @@ -3636,6 +3636,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
return 0; return 0;
} }
@ -174,7 +174,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
* bursts that are required to move all packets in this TD. Only SuperSpeed * bursts that are required to move all packets in this TD. Only SuperSpeed
--- a/drivers/usb/host/xhci.c --- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c
@@ -5389,6 +5389,7 @@ static const struct hc_driver xhci_hc_dr @@ -5393,6 +5393,7 @@ static const struct hc_driver xhci_hc_dr
.disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout, .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout,
.find_raw_port_number = xhci_find_raw_port_number, .find_raw_port_number = xhci_find_raw_port_number,
.clear_tt_buffer_complete = xhci_clear_tt_buffer_complete, .clear_tt_buffer_complete = xhci_clear_tt_buffer_complete,

View File

@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci-ring.c --- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c
@@ -2097,12 +2097,9 @@ static int process_ctrl_td(struct xhci_h @@ -2103,12 +2103,9 @@ static int process_ctrl_td(struct xhci_h
switch (trb_comp_code) { switch (trb_comp_code) {
case COMP_SUCCESS: case COMP_SUCCESS:

View File

@ -24,7 +24,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
--- a/drivers/usb/host/xhci.c --- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c
@@ -5410,6 +5410,8 @@ void xhci_init_driver(struct hc_driver * @@ -5414,6 +5414,8 @@ void xhci_init_driver(struct hc_driver *
drv->check_bandwidth = over->check_bandwidth; drv->check_bandwidth = over->check_bandwidth;
if (over->reset_bandwidth) if (over->reset_bandwidth)
drv->reset_bandwidth = over->reset_bandwidth; drv->reset_bandwidth = over->reset_bandwidth;

View File

@ -20,7 +20,7 @@ Signed-off-by: Li Jun <jun.li@freescale.com>
--- a/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c
@@ -4779,7 +4779,8 @@ hub_port_init(struct usb_hub *hub, struc @@ -4777,7 +4777,8 @@ hub_port_init(struct usb_hub *hub, struc
} }
if (r) { if (r) {
if (r != -ENODEV) if (r != -ENODEV)

View File

@ -16,7 +16,7 @@ Signed-off-by: Li Jun <jun.li@nxp.com>
--- a/drivers/usb/host/xhci-hub.c --- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c
@@ -1739,7 +1739,8 @@ static bool xhci_port_missing_cas_quirk( @@ -1740,7 +1740,8 @@ static bool xhci_port_missing_cas_quirk(
return false; return false;
if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) && if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&