[openwrt/openwrt] kernel: backport b53/bcm_sf2 changes from v5.6

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 7 01:51:09 PST 2022


rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/1f5024aa73fcf3b67bba7785401f9cd7067c88f2

commit 1f5024aa73fcf3b67bba7785401f9cd7067c88f2
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Wed Dec 7 09:37:08 2022 +0100

    kernel: backport b53/bcm_sf2 changes from v5.6
    
    This b53 backport significantly stabilizes switch traffic performance.
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 ...-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch |   4 +-
 ...a-b53-Print-err-message-on-SW_RST-timeout.patch |   2 +-
 ...m_sf2-support-BCM4908-s-integrated-switch.patch |   2 +-
 ...et-information-about-stacked-DSA-protocol.patch | 363 +++++++++++++++++++++
 ...-Enable-Broadcom-tags-for-531x5-539x-fami.patch | 104 ++++++
 ...dsa-b53-Fix-valid-setting-for-MDB-entries.patch |   2 +-
 ...dsa-mt7530-add-support-for-port-mirroring.patch |   6 +-
 ...-mv88e6xxx-Add-support-for-port-mirroring.patch |   4 +-
 ...8e6xxx-fix-broken-if-statement-because-of.patch |   2 +-
 ...vide-an-option-for-drivers-to-always-rece.patch |   8 +-
 .../753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch   |   2 +-
 ...net-dsa-rtl8366rb-Support-the-CPU-DSA-tag.patch |   6 +-
 ...omatically-bring-up-DSA-master-when-openi.patch |   2 +-
 ...louder-when-a-non-legacy-FDB-operation-fa.patch |   4 +-
 ...-t-use-switchdev_notifier_fdb_info-in-dsa.patch |   8 +-
 ...e-switchdev-event-implementation-under-th.patch |   4 +-
 ...t-early-in-dsa_slave_switchdev_event-if-w.patch |   2 +-
 ...ten-for-SWITCHDEV_-FDB-DEL-_ADD_TO_DEVICE.patch |   6 +-
 ...t-dsa-support-hardware-flow-table-offload.patch |   4 +-
 .../761-net-dsa-mt7530-Support-EEE-features.patch  |   6 +-
 ...lude-local-addresses-in-assisted-CPU-port.patch |   2 +-
 ...lude-bridge-addresses-in-assisted-CPU-por.patch |   2 +-
 ...c-static-FDB-entries-on-foreign-interface.patch |   4 +-
 ...xxx-Request-assisted-learning-on-CPU-port.patch |   2 +-
 ...a-ocelot-add-tsn-support-for-felix-switch.patch |   2 +-
 ...pagate-resolved-link-config-via-mac_link_.patch |  10 +-
 ...530-use-resolved-link-config-in-mac_link_.patch |   8 +-
 ...530-Extend-device-data-ready-for-adding-a.patch |  12 +-
 ...a-mt7530-Add-the-support-of-MT7531-switch.patch |  34 +-
 29 files changed, 542 insertions(+), 75 deletions(-)

diff --git a/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch b/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch
index 0b2ebbe1f8..04e506f6fe 100644
--- a/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch
+++ b/target/linux/bcm4908/patches-5.4/070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  #include <linux/delay.h>
  #include <linux/export.h>
  #include <linux/gpio.h>
-@@ -2533,8 +2531,9 @@ int b53_switch_detect(struct b53_device
+@@ -2567,8 +2565,9 @@ int b53_switch_detect(struct b53_device
  			dev->chip_id = id32;
  			break;
  		default:
@@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			return -ENODEV;
  		}
  	}
-@@ -2564,7 +2563,8 @@ int b53_switch_register(struct b53_devic
+@@ -2598,7 +2597,8 @@ int b53_switch_register(struct b53_devic
  	if (ret)
  		return ret;
  
diff --git a/target/linux/bcm4908/patches-5.4/070-v5.10-0002-net-dsa-b53-Print-err-message-on-SW_RST-timeout.patch b/target/linux/bcm4908/patches-5.4/070-v5.10-0002-net-dsa-b53-Print-err-message-on-SW_RST-timeout.patch
index 2661b0918e..d619aa45b7 100644
--- a/target/linux/bcm4908/patches-5.4/070-v5.10-0002-net-dsa-b53-Print-err-message-on-SW_RST-timeout.patch
+++ b/target/linux/bcm4908/patches-5.4/070-v5.10-0002-net-dsa-b53-Print-err-message-on-SW_RST-timeout.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -755,8 +755,11 @@ static int b53_switch_reset(struct b53_d
+@@ -768,8 +768,11 @@ static int b53_switch_reset(struct b53_d
  			usleep_range(1000, 2000);
  		} while (timeout-- > 0);
  
diff --git a/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch b/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch
index bd8bb1e51e..e27ecc3498 100644
--- a/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch
+++ b/target/linux/bcm4908/patches-5.4/071-v5.12-0001-net-dsa-bcm_sf2-support-BCM4908-s-integrated-switch.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2329,6 +2329,22 @@ static const struct b53_chip_data b53_sw
+@@ -2363,6 +2363,22 @@ static const struct b53_chip_data b53_sw
  		.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
  	},
diff --git a/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch b/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch
new file mode 100644
index 0000000000..0a05721864
--- /dev/null
+++ b/target/linux/generic/backport-5.4/704-v5.6-net-dsa-Get-information-about-stacked-DSA-protocol.patch
@@ -0,0 +1,363 @@
+From 4d776482ecc689bdd68627985ac4cb5a6f325953 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli at gmail.com>
+Date: Tue, 7 Jan 2020 21:06:05 -0800
+Subject: [PATCH] net: dsa: Get information about stacked DSA protocol
+
+It is possible to stack multiple DSA switches in a way that they are not
+part of the tree (disjoint) but the DSA master of a switch is a DSA
+slave of another. When that happens switch drivers may have to know this
+is the case so as to determine whether their tagging protocol has a
+remove chance of working.
+
+This is useful for specific switch drivers such as b53 where devices
+have been known to be stacked in the wild without the Broadcom tag
+protocol supporting that feature. This allows b53 to continue supporting
+those devices by forcing the disabling of Broadcom tags on the outermost
+switches if necessary.
+
+The get_tag_protocol() function is therefore updated to gain an
+additional enum dsa_tag_protocol argument which denotes the current
+tagging protocol used by the DSA master we are attached to, else
+DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree.
+
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/b53/b53_common.c       | 22 +++++++++++-------
+ drivers/net/dsa/b53/b53_priv.h         |  4 +++-
+ drivers/net/dsa/dsa_loop.c             |  3 ++-
+ drivers/net/dsa/lan9303-core.c         |  3 ++-
+ drivers/net/dsa/lantiq_gswip.c         |  3 ++-
+ drivers/net/dsa/microchip/ksz8795.c    |  3 ++-
+ drivers/net/dsa/microchip/ksz9477.c    |  3 ++-
+ drivers/net/dsa/mt7530.c               |  3 ++-
+ drivers/net/dsa/mv88e6060.c            |  3 ++-
+ drivers/net/dsa/mv88e6xxx/chip.c       |  3 ++-
+ drivers/net/dsa/ocelot/felix.c         |  3 ++-
+ drivers/net/dsa/qca/ar9331.c           |  3 ++-
+ drivers/net/dsa/qca8k.c                |  3 ++-
+ drivers/net/dsa/rtl8366rb.c            |  3 ++-
+ drivers/net/dsa/sja1105/sja1105_main.c |  3 ++-
+ drivers/net/dsa/vitesse-vsc73xx-core.c |  3 ++-
+ include/net/dsa.h                      |  3 ++-
+ net/dsa/dsa2.c                         | 31 ++++++++++++++++++++++++--
+ net/dsa/dsa_priv.h                     |  1 +
+ net/dsa/slave.c                        |  4 +---
+ 20 files changed, 78 insertions(+), 29 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -587,9 +587,8 @@ EXPORT_SYMBOL(b53_disable_port);
+ 
+ void b53_brcm_hdr_setup(struct dsa_switch *ds, int port)
+ {
+-	bool tag_en = !(ds->ops->get_tag_protocol(ds, port) ==
+-			 DSA_TAG_PROTO_NONE);
+ 	struct b53_device *dev = ds->priv;
++	bool tag_en = !(dev->tag_protocol == DSA_TAG_PROTO_NONE);
+ 	u8 hdr_ctl, val;
+ 	u16 reg;
+ 
+@@ -1921,7 +1920,8 @@ static bool b53_can_enable_brcm_tags(str
+ 	return ret;
+ }
+ 
+-enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port)
++enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port,
++					   enum dsa_tag_protocol mprot)
+ {
+ 	struct b53_device *dev = ds->priv;
+ 
+@@ -1931,16 +1931,22 @@ enum dsa_tag_protocol b53_get_tag_protoc
+ 	 * misses on multicast addresses (TBD).
+ 	 */
+ 	if (is5325(dev) || is5365(dev) || is539x(dev) || is531x5(dev) ||
+-	    !b53_can_enable_brcm_tags(ds, port))
+-		return DSA_TAG_PROTO_NONE;
++	    !b53_can_enable_brcm_tags(ds, port)) {
++		dev->tag_protocol = DSA_TAG_PROTO_NONE;
++		goto out;
++	}
+ 
+ 	/* Broadcom BCM58xx chips have a flow accelerator on Port 8
+ 	 * which requires us to use the prepended Broadcom tag type
+ 	 */
+-	if (dev->chip_id == BCM58XX_DEVICE_ID && port == B53_CPU_PORT)
+-		return DSA_TAG_PROTO_BRCM_PREPEND;
++	if (dev->chip_id == BCM58XX_DEVICE_ID && port == B53_CPU_PORT) {
++		dev->tag_protocol = DSA_TAG_PROTO_BRCM_PREPEND;
++		goto out;
++	}
+ 
+-	return DSA_TAG_PROTO_BRCM;
++	dev->tag_protocol = DSA_TAG_PROTO_BRCM;
++out:
++	return dev->tag_protocol;
+ }
+ EXPORT_SYMBOL(b53_get_tag_protocol);
+ 
+--- a/drivers/net/dsa/b53/b53_priv.h
++++ b/drivers/net/dsa/b53/b53_priv.h
+@@ -118,6 +118,7 @@ struct b53_device {
+ 	u8 jumbo_size_reg;
+ 	int reset_gpio;
+ 	u8 num_arl_entries;
++	enum dsa_tag_protocol tag_protocol;
+ 
+ 	/* used ports mask */
+ 	u16 enabled_ports;
+@@ -359,7 +360,8 @@ int b53_mdb_del(struct dsa_switch *ds, i
+ 		const struct switchdev_obj_port_mdb *mdb);
+ int b53_mirror_add(struct dsa_switch *ds, int port,
+ 		   struct dsa_mall_mirror_tc_entry *mirror, bool ingress);
+-enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port);
++enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port,
++					   enum dsa_tag_protocol mprot);
+ void b53_mirror_del(struct dsa_switch *ds, int port,
+ 		    struct dsa_mall_mirror_tc_entry *mirror);
+ int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
+--- a/drivers/net/dsa/dsa_loop.c
++++ b/drivers/net/dsa/dsa_loop.c
+@@ -61,7 +61,8 @@ struct dsa_loop_priv {
+ static struct phy_device *phydevs[PHY_MAX_ADDR];
+ 
+ static enum dsa_tag_protocol dsa_loop_get_protocol(struct dsa_switch *ds,
+-						   int port)
++						   int port,
++						   enum dsa_tag_protocol mp)
+ {
+ 	dev_dbg(ds->dev, "%s: port: %d\n", __func__, port);
+ 
+--- a/drivers/net/dsa/lan9303-core.c
++++ b/drivers/net/dsa/lan9303-core.c
+@@ -889,7 +889,8 @@ static int lan9303_check_device(struct l
+ /* ---------------------------- DSA -----------------------------------*/
+ 
+ static enum dsa_tag_protocol lan9303_get_tag_protocol(struct dsa_switch *ds,
+-						      int port)
++						      int port,
++						      enum dsa_tag_protocol mp)
+ {
+ 	return DSA_TAG_PROTO_LAN9303;
+ }
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -860,7 +860,8 @@ static int gswip_setup(struct dsa_switch
+ }
+ 
+ static enum dsa_tag_protocol gswip_get_tag_protocol(struct dsa_switch *ds,
+-						    int port)
++						    int port,
++						    enum dsa_tag_protocol mp)
+ {
+ 	return DSA_TAG_PROTO_GSWIP;
+ }
+--- a/drivers/net/dsa/microchip/ksz8795.c
++++ b/drivers/net/dsa/microchip/ksz8795.c
+@@ -645,7 +645,8 @@ static void ksz8795_w_phy(struct ksz_dev
+ }
+ 
+ static enum dsa_tag_protocol ksz8795_get_tag_protocol(struct dsa_switch *ds,
+-						      int port)
++						      int port,
++						      enum dsa_tag_protocol mp)
+ {
+ 	return DSA_TAG_PROTO_KSZ8795;
+ }
+--- a/drivers/net/dsa/microchip/ksz9477.c
++++ b/drivers/net/dsa/microchip/ksz9477.c
+@@ -295,7 +295,8 @@ static void ksz9477_port_init_cnt(struct
+ }
+ 
+ static enum dsa_tag_protocol ksz9477_get_tag_protocol(struct dsa_switch *ds,
+-						      int port)
++						      int port,
++						      enum dsa_tag_protocol mp)
+ {
+ 	enum dsa_tag_protocol proto = DSA_TAG_PROTO_KSZ9477;
+ 	struct ksz_device *dev = ds->priv;
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1144,7 +1144,8 @@ mt7530_port_vlan_del(struct dsa_switch *
+ }
+ 
+ static enum dsa_tag_protocol
+-mtk_get_tag_protocol(struct dsa_switch *ds, int port)
++mtk_get_tag_protocol(struct dsa_switch *ds, int port,
++		     enum dsa_tag_protocol mp)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+--- a/drivers/net/dsa/mv88e6060.c
++++ b/drivers/net/dsa/mv88e6060.c
+@@ -43,7 +43,8 @@ static const char *mv88e6060_get_name(st
+ }
+ 
+ static enum dsa_tag_protocol mv88e6060_get_tag_protocol(struct dsa_switch *ds,
+-							int port)
++							int port,
++							enum dsa_tag_protocol m)
+ {
+ 	return DSA_TAG_PROTO_TRAILER;
+ }
+--- a/drivers/net/dsa/mv88e6xxx/chip.c
++++ b/drivers/net/dsa/mv88e6xxx/chip.c
+@@ -4878,7 +4878,8 @@ static struct mv88e6xxx_chip *mv88e6xxx_
+ }
+ 
+ static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
+-							int port)
++							int port,
++							enum dsa_tag_protocol m)
+ {
+ 	struct mv88e6xxx_chip *chip = ds->priv;
+ 
+--- a/drivers/net/dsa/qca8k.c
++++ b/drivers/net/dsa/qca8k.c
+@@ -1016,7 +1016,8 @@ qca8k_port_fdb_dump(struct dsa_switch *d
+ }
+ 
+ static enum dsa_tag_protocol
+-qca8k_get_tag_protocol(struct dsa_switch *ds, int port)
++qca8k_get_tag_protocol(struct dsa_switch *ds, int port,
++		       enum dsa_tag_protocol mp)
+ {
+ 	return DSA_TAG_PROTO_QCA;
+ }
+--- a/drivers/net/dsa/rtl8366rb.c
++++ b/drivers/net/dsa/rtl8366rb.c
+@@ -964,7 +964,8 @@ static int rtl8366rb_setup(struct dsa_sw
+ }
+ 
+ static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,
+-						      int port)
++						      int port,
++						      enum dsa_tag_protocol mp)
+ {
+ 	/* For now, the RTL switches are handled without any custom tags.
+ 	 *
+--- a/drivers/net/dsa/sja1105/sja1105_main.c
++++ b/drivers/net/dsa/sja1105/sja1105_main.c
+@@ -1591,7 +1591,8 @@ static int sja1105_setup_8021q_tagging(s
+ }
+ 
+ static enum dsa_tag_protocol
+-sja1105_get_tag_protocol(struct dsa_switch *ds, int port)
++sja1105_get_tag_protocol(struct dsa_switch *ds, int port,
++			 enum dsa_tag_protocol mp)
+ {
+ 	return DSA_TAG_PROTO_SJA1105;
+ }
+--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
++++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
+@@ -542,7 +542,8 @@ static int vsc73xx_phy_write(struct dsa_
+ }
+ 
+ static enum dsa_tag_protocol vsc73xx_get_tag_protocol(struct dsa_switch *ds,
+-						      int port)
++						      int port,
++						      enum dsa_tag_protocol mp)
+ {
+ 	/* The switch internally uses a 8 byte header with length,
+ 	 * source port, tag, LPA and priority. This is supposedly
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -353,7 +353,8 @@ typedef int dsa_fdb_dump_cb_t(const unsi
+ 			      bool is_static, void *data);
+ struct dsa_switch_ops {
+ 	enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
+-						  int port);
++						  int port,
++						  enum dsa_tag_protocol mprot);
+ 
+ 	int	(*setup)(struct dsa_switch *ds);
+ 	void	(*teardown)(struct dsa_switch *ds);
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
+@@ -631,6 +631,32 @@ static int dsa_port_parse_dsa(struct dsa
+ 	return 0;
+ }
+ 
++static enum dsa_tag_protocol dsa_get_tag_protocol(struct dsa_port *dp,
++						  struct net_device *master)
++{
++	enum dsa_tag_protocol tag_protocol = DSA_TAG_PROTO_NONE;
++	struct dsa_switch *mds, *ds = dp->ds;
++	unsigned int mdp_upstream;
++	struct dsa_port *mdp;
++
++	/* It is possible to stack DSA switches onto one another when that
++	 * happens the switch driver may want to know if its tagging protocol
++	 * is going to work in such a configuration.
++	 */
++	if (dsa_slave_dev_check(master)) {
++		mdp = dsa_slave_to_port(master);
++		mds = mdp->ds;
++		mdp_upstream = dsa_upstream_port(mds, mdp->index);
++		tag_protocol = mds->ops->get_tag_protocol(mds, mdp_upstream,
++							  DSA_TAG_PROTO_NONE);
++	}
++
++	/* If the master device is not itself a DSA slave in a disjoint DSA
++	 * tree, then return immediately.
++	 */
++	return ds->ops->get_tag_protocol(ds, dp->index, tag_protocol);
++}
++
+ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master)
+ {
+ 	struct dsa_switch *ds = dp->ds;
+@@ -638,20 +664,21 @@ static int dsa_port_parse_cpu(struct dsa
+ 	const struct dsa_device_ops *tag_ops;
+ 	enum dsa_tag_protocol tag_protocol;
+ 
+-	tag_protocol = ds->ops->get_tag_protocol(ds, dp->index);
++	tag_protocol = dsa_get_tag_protocol(dp, master);
+ 	tag_ops = dsa_tag_driver_get(tag_protocol);
+ 	if (IS_ERR(tag_ops)) {
+ 		if (PTR_ERR(tag_ops) == -ENOPROTOOPT)
+ 			return -EPROBE_DEFER;
+ 		dev_warn(ds->dev, "No tagger for this switch\n");
++		dp->master = NULL;
+ 		return PTR_ERR(tag_ops);
+ 	}
+ 
++	dp->master = master;
+ 	dp->type = DSA_PORT_TYPE_CPU;
+ 	dp->filter = tag_ops->filter;
+ 	dp->rcv = tag_ops->rcv;
+ 	dp->tag_ops = tag_ops;
+-	dp->master = master;
+ 	dp->dst = dst;
+ 
+ 	return 0;
+--- a/net/dsa/dsa_priv.h
++++ b/net/dsa/dsa_priv.h
+@@ -189,6 +189,7 @@ extern const struct dsa_device_ops notag
+ void dsa_slave_mii_bus_init(struct dsa_switch *ds);
+ int dsa_slave_create(struct dsa_port *dp);
+ void dsa_slave_destroy(struct net_device *slave_dev);
++bool dsa_slave_dev_check(const struct net_device *dev);
+ int dsa_slave_suspend(struct net_device *slave_dev);
+ int dsa_slave_resume(struct net_device *slave_dev);
+ int dsa_slave_register_notifier(void);
+--- a/net/dsa/slave.c
++++ b/net/dsa/slave.c
+@@ -22,8 +22,6 @@
+ 
+ #include "dsa_priv.h"
+ 
+-static bool dsa_slave_dev_check(const struct net_device *dev);
+-
+ /* slave mii_bus handling ***************************************************/
+ static int dsa_slave_phy_read(struct mii_bus *bus, int addr, int reg)
+ {
+@@ -1494,7 +1492,7 @@ void dsa_slave_destroy(struct net_device
+ 	free_netdev(slave_dev);
+ }
+ 
+-static bool dsa_slave_dev_check(const struct net_device *dev)
++bool dsa_slave_dev_check(const struct net_device *dev)
+ {
+ 	return dev->netdev_ops == &dsa_slave_netdev_ops;
+ }
diff --git a/target/linux/generic/backport-5.4/705-v5.6-0001-net-dsa-b53-Enable-Broadcom-tags-for-531x5-539x-fami.patch b/target/linux/generic/backport-5.4/705-v5.6-0001-net-dsa-b53-Enable-Broadcom-tags-for-531x5-539x-fami.patch
new file mode 100644
index 0000000000..abc2dc836a
--- /dev/null
+++ b/target/linux/generic/backport-5.4/705-v5.6-0001-net-dsa-b53-Enable-Broadcom-tags-for-531x5-539x-fami.patch
@@ -0,0 +1,104 @@
+From 8fab459e69abfd04a66d76423d18ba853fced4ab Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli at gmail.com>
+Date: Tue, 7 Jan 2020 21:06:06 -0800
+Subject: [PATCH] net: dsa: b53: Enable Broadcom tags for 531x5/539x families
+
+The BCM531x5 and BCM539x families require that the IMP port be enabled
+within the management page and that management mode (SM_SW_FWD_MODE) be
+turned on. Once this is done, everything works as expected, including
+multicast with standalone DSA devices or bridge devices.
+
+Because such switches are frequencly cascaded with other internal
+Broadcom switches on which we want to enable Broadcom tags, update
+b53_can_enable_brcm_tags() to check the kind of DSA master tagging
+protocol being used, if it is one of the two supported Broadcom tagging
+protocols, force DSA_TAG_PROTO_NONE.
+
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/b53/b53_common.c | 46 +++++++++++++++++++++++++-------
+ 1 file changed, 37 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -371,8 +371,6 @@ static void b53_enable_vlan(struct b53_d
+ 		b53_read8(dev, B53_VLAN_PAGE, B53_VLAN_CTRL5, &vc5);
+ 	}
+ 
+-	mgmt &= ~SM_SW_FWD_MODE;
+-
+ 	if (enable) {
+ 		vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID;
+ 		vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN;
+@@ -608,6 +606,22 @@ void b53_brcm_hdr_setup(struct dsa_switc
+ 		break;
+ 	}
+ 
++	/* Enable management mode if tagging is requested */
++	b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &hdr_ctl);
++	if (tag_en)
++		hdr_ctl |= SM_SW_FWD_MODE;
++	else
++		hdr_ctl &= ~SM_SW_FWD_MODE;
++	b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, hdr_ctl);
++
++	/* Configure the appropriate IMP port */
++	b53_read8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, &hdr_ctl);
++	if (port == 8)
++		hdr_ctl |= GC_FRM_MGMT_PORT_MII;
++	else if (port == 5)
++		hdr_ctl |= GC_FRM_MGMT_PORT_M;
++	b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, hdr_ctl);
++
+ 	/* Enable Broadcom tags for IMP port */
+ 	b53_read8(dev, B53_MGMT_PAGE, B53_BRCM_HDR, &hdr_ctl);
+ 	if (tag_en)
+@@ -1910,13 +1924,29 @@ static bool b53_possible_cpu_port(struct
+ 	return false;
+ }
+ 
+-static bool b53_can_enable_brcm_tags(struct dsa_switch *ds, int port)
++static bool b53_can_enable_brcm_tags(struct dsa_switch *ds, int port,
++				     enum dsa_tag_protocol tag_protocol)
+ {
+ 	bool ret = b53_possible_cpu_port(ds, port);
+ 
+-	if (!ret)
++	if (!ret) {
+ 		dev_warn(ds->dev, "Port %d is not Broadcom tag capable\n",
+ 			 port);
++		return ret;
++	}
++
++	switch (tag_protocol) {
++	case DSA_TAG_PROTO_BRCM:
++	case DSA_TAG_PROTO_BRCM_PREPEND:
++		dev_warn(ds->dev,
++			 "Port %d is stacked to Broadcom tag switch\n", port);
++		ret = false;
++		break;
++	default:
++		ret = true;
++		break;
++	}
++
+ 	return ret;
+ }
+ 
+@@ -1926,12 +1956,10 @@ enum dsa_tag_protocol b53_get_tag_protoc
+ 	struct b53_device *dev = ds->priv;
+ 
+ 	/* Older models (5325, 5365) support a different tag format that we do
+-	 * not support in net/dsa/tag_brcm.c yet. 539x and 531x5 require managed
+-	 * mode to be turned on which means we need to specifically manage ARL
+-	 * misses on multicast addresses (TBD).
++	 * not support in net/dsa/tag_brcm.c yet.
+ 	 */
+-	if (is5325(dev) || is5365(dev) || is539x(dev) || is531x5(dev) ||
+-	    !b53_can_enable_brcm_tags(ds, port)) {
++	if (is5325(dev) || is5365(dev) ||
++	    !b53_can_enable_brcm_tags(ds, port, mprot)) {
+ 		dev->tag_protocol = DSA_TAG_PROTO_NONE;
+ 		goto out;
+ 	}
diff --git a/target/linux/generic/backport-5.4/707-v5.7-0016-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch b/target/linux/generic/backport-5.4/707-v5.7-0016-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
index cb6497f28a..8225ca1d29 100644
--- a/target/linux/generic/backport-5.4/707-v5.7-0016-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
+++ b/target/linux/generic/backport-5.4/707-v5.7-0016-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1564,7 +1564,6 @@ static int b53_arl_op(struct b53_device
+@@ -1577,7 +1577,6 @@ static int b53_arl_op(struct b53_device
  		ent.is_valid = !!(ent.port);
  	}
  
diff --git a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch
index 71a06997c3..566dfce5ca 100644
--- a/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch
+++ b/target/linux/generic/backport-5.4/745-v5.7-net-dsa-mt7530-add-support-for-port-mirroring.patch
@@ -80,9 +80,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +}
 +
  static enum dsa_tag_protocol
- mtk_get_tag_protocol(struct dsa_switch *ds, int port)
- {
-@@ -1520,6 +1578,8 @@ static const struct dsa_switch_ops mt753
+ mtk_get_tag_protocol(struct dsa_switch *ds, int port,
+ 		     enum dsa_tag_protocol mp)
+@@ -1521,6 +1579,8 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_prepare	= mt7530_port_vlan_prepare,
  	.port_vlan_add		= mt7530_port_vlan_add,
  	.port_vlan_del		= mt7530_port_vlan_del,
diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
index a45a22e485..81acdaecd2 100644
--- a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
+++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4928,6 +4928,80 @@ static int mv88e6xxx_port_mdb_del(struct
+@@ -4929,6 +4929,80 @@ static int mv88e6xxx_port_mdb_del(struct
  	return err;
  }
  
@@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
  					 bool unicast, bool multicast)
  {
-@@ -4982,6 +5056,8 @@ static const struct dsa_switch_ops mv88e
+@@ -4983,6 +5057,8 @@ static const struct dsa_switch_ops mv88e
  	.port_mdb_prepare       = mv88e6xxx_port_mdb_prepare,
  	.port_mdb_add           = mv88e6xxx_port_mdb_add,
  	.port_mdb_del           = mv88e6xxx_port_mdb_del,
diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
index 837126a336..9985e1cf56 100644
--- a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
+++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4995,7 +4995,7 @@ static void mv88e6xxx_port_mirror_del(st
+@@ -4996,7 +4996,7 @@ static void mv88e6xxx_port_mirror_del(st
  		if (chip->info->ops->set_egress_port(chip,
  						     direction,
  						     dsa_upstream_port(ds,
diff --git a/target/linux/generic/backport-5.4/752-v5.8-net-dsa-provide-an-option-for-drivers-to-always-rece.patch b/target/linux/generic/backport-5.4/752-v5.8-net-dsa-provide-an-option-for-drivers-to-always-rece.patch
index 52d9351b70..86f1f8300e 100644
--- a/target/linux/generic/backport-5.4/752-v5.8-net-dsa-provide-an-option-for-drivers-to-always-rece.patch
+++ b/target/linux/generic/backport-5.4/752-v5.8-net-dsa-provide-an-option-for-drivers-to-always-rece.patch
@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  {
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -319,7 +319,7 @@ static int dsa_slave_vlan_add(struct net
+@@ -317,7 +317,7 @@ static int dsa_slave_vlan_add(struct net
  	if (obj->orig_dev != dev)
  		return -EOPNOTSUPP;
  
@@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return 0;
  
  	vlan = *SWITCHDEV_OBJ_PORT_VLAN(obj);
-@@ -386,7 +386,7 @@ static int dsa_slave_vlan_del(struct net
+@@ -384,7 +384,7 @@ static int dsa_slave_vlan_del(struct net
  	if (obj->orig_dev != dev)
  		return -EOPNOTSUPP;
  
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return 0;
  
  	/* Do not deprogram the CPU port as it may be shared with other user
-@@ -1120,7 +1120,7 @@ static int dsa_slave_vlan_rx_add_vid(str
+@@ -1118,7 +1118,7 @@ static int dsa_slave_vlan_rx_add_vid(str
  	 * need to emulate the switchdev prepare + commit phase.
  	 */
  	if (dp->bridge_dev) {
@@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			return 0;
  
  		/* br_vlan_get_info() returns -EINVAL or -ENOENT if the
-@@ -1154,7 +1154,7 @@ static int dsa_slave_vlan_rx_kill_vid(st
+@@ -1152,7 +1152,7 @@ static int dsa_slave_vlan_rx_kill_vid(st
  	 * need to emulate the switchdev prepare + commit phase.
  	 */
  	if (dp->bridge_dev) {
diff --git a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch
index 0804cea9f7..e26829ee60 100644
--- a/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch
+++ b/target/linux/generic/backport-5.4/753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch
@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mutex_lock(&priv->reg_mutex);
  
  	pvid = priv->ports[port].pvid;
-@@ -1232,6 +1220,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -1233,6 +1221,7 @@ mt7530_setup(struct dsa_switch *ds)
  	 * as two netdev instances.
  	 */
  	dn = ds->ports[MT7530_CPU_PORT].master->dev.of_node->parent;
diff --git a/target/linux/generic/backport-5.4/758-v5.8-net-dsa-rtl8366rb-Support-the-CPU-DSA-tag.patch b/target/linux/generic/backport-5.4/758-v5.8-net-dsa-rtl8366rb-Support-the-CPU-DSA-tag.patch
index b68c033bbe..cabb9d9a92 100644
--- a/target/linux/generic/backport-5.4/758-v5.8-net-dsa-rtl8366rb-Support-the-CPU-DSA-tag.patch
+++ b/target/linux/generic/backport-5.4/758-v5.8-net-dsa-rtl8366rb-Support-the-CPU-DSA-tag.patch
@@ -74,9 +74,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (ret)
  		return ret;
  
-@@ -966,21 +964,8 @@ static int rtl8366rb_setup(struct dsa_sw
- static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,
- 						      int port)
+@@ -967,21 +965,8 @@ static enum dsa_tag_protocol rtl8366_get
+ 						      int port,
+ 						      enum dsa_tag_protocol mp)
  {
 -	/* For now, the RTL switches are handled without any custom tags.
 -	 *
diff --git a/target/linux/generic/backport-5.4/765-v5.12-net-dsa-automatically-bring-up-DSA-master-when-openi.patch b/target/linux/generic/backport-5.4/765-v5.12-net-dsa-automatically-bring-up-DSA-master-when-openi.patch
index 7ec26899f9..3b630377f9 100644
--- a/target/linux/generic/backport-5.4/765-v5.12-net-dsa-automatically-bring-up-DSA-master-when-openi.patch
+++ b/target/linux/generic/backport-5.4/765-v5.12-net-dsa-automatically-bring-up-DSA-master-when-openi.patch
@@ -69,7 +69,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -70,8 +70,11 @@ static int dsa_slave_open(struct net_dev
+@@ -68,8 +68,11 @@ static int dsa_slave_open(struct net_dev
  	struct dsa_port *dp = dsa_slave_to_port(dev);
  	int err;
  
diff --git a/target/linux/generic/backport-5.4/771-v5.12-net-dsa-be-louder-when-a-non-legacy-FDB-operation-fa.patch b/target/linux/generic/backport-5.4/771-v5.12-net-dsa-be-louder-when-a-non-legacy-FDB-operation-fa.patch
index 893eb719ca..f889489915 100644
--- a/target/linux/generic/backport-5.4/771-v5.12-net-dsa-be-louder-when-a-non-legacy-FDB-operation-fa.patch
+++ b/target/linux/generic/backport-5.4/771-v5.12-net-dsa-be-louder-when-a-non-legacy-FDB-operation-fa.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1593,7 +1593,9 @@ static void dsa_slave_switchdev_event_wo
+@@ -1591,7 +1591,9 @@ static void dsa_slave_switchdev_event_wo
  
  		err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid);
  		if (err) {
@@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			break;
  		}
  		fdb_info->offloaded = true;
-@@ -1608,9 +1610,11 @@ static void dsa_slave_switchdev_event_wo
+@@ -1606,9 +1608,11 @@ static void dsa_slave_switchdev_event_wo
  
  		err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid);
  		if (err) {
diff --git a/target/linux/generic/backport-5.4/772-v5.12-net-dsa-don-t-use-switchdev_notifier_fdb_info-in-dsa.patch b/target/linux/generic/backport-5.4/772-v5.12-net-dsa-don-t-use-switchdev_notifier_fdb_info-in-dsa.patch
index 275870d19f..bd1685a16a 100644
--- a/target/linux/generic/backport-5.4/772-v5.12-net-dsa-don-t-use-switchdev_notifier_fdb_info-in-dsa.patch
+++ b/target/linux/generic/backport-5.4/772-v5.12-net-dsa-don-t-use-switchdev_notifier_fdb_info-in-dsa.patch
@@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct sk_buff *	(*xmit)(struct sk_buff *skb,
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1568,76 +1568,66 @@ static int dsa_slave_netdevice_event(str
+@@ -1566,76 +1566,66 @@ static int dsa_slave_netdevice_event(str
  	return NOTIFY_DONE;
  }
  
@@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  /* Called under rcu_read_lock() */
-@@ -1645,7 +1635,9 @@ static int dsa_slave_switchdev_event(str
+@@ -1643,7 +1633,9 @@ static int dsa_slave_switchdev_event(str
  				     unsigned long event, void *ptr)
  {
  	struct net_device *dev = switchdev_notifier_info_to_dev(ptr);
@@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	int err;
  
  	if (event == SWITCHDEV_PORT_ATTR_SET) {
-@@ -1658,20 +1650,32 @@ static int dsa_slave_switchdev_event(str
+@@ -1656,20 +1648,32 @@ static int dsa_slave_switchdev_event(str
  	if (!dsa_slave_dev_check(dev))
  		return NOTIFY_DONE;
  
@@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev_hold(dev);
  		break;
  	default:
-@@ -1681,10 +1685,6 @@ static int dsa_slave_switchdev_event(str
+@@ -1679,10 +1683,6 @@ static int dsa_slave_switchdev_event(str
  
  	dsa_schedule_work(&switchdev_work->work);
  	return NOTIFY_OK;
diff --git a/target/linux/generic/backport-5.4/773-v5.12-net-dsa-move-switchdev-event-implementation-under-th.patch b/target/linux/generic/backport-5.4/773-v5.12-net-dsa-move-switchdev-event-implementation-under-th.patch
index b70986fcc1..acc6e16117 100644
--- a/target/linux/generic/backport-5.4/773-v5.12-net-dsa-move-switchdev-event-implementation-under-th.patch
+++ b/target/linux/generic/backport-5.4/773-v5.12-net-dsa-move-switchdev-event-implementation-under-th.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1640,31 +1640,29 @@ static int dsa_slave_switchdev_event(str
+@@ -1638,31 +1638,29 @@ static int dsa_slave_switchdev_event(str
  	struct dsa_port *dp;
  	int err;
  
@@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		fdb_info = ptr;
  
  		if (!fdb_info->added_by_user) {
-@@ -1677,13 +1675,12 @@ static int dsa_slave_switchdev_event(str
+@@ -1675,13 +1673,12 @@ static int dsa_slave_switchdev_event(str
  		switchdev_work->vid = fdb_info->vid;
  
  		dev_hold(dev);
diff --git a/target/linux/generic/backport-5.4/774-v5.12-net-dsa-exit-early-in-dsa_slave_switchdev_event-if-w.patch b/target/linux/generic/backport-5.4/774-v5.12-net-dsa-exit-early-in-dsa_slave_switchdev_event-if-w.patch
index c7ed4064e8..35266b71bc 100644
--- a/target/linux/generic/backport-5.4/774-v5.12-net-dsa-exit-early-in-dsa_slave_switchdev_event-if-w.patch
+++ b/target/linux/generic/backport-5.4/774-v5.12-net-dsa-exit-early-in-dsa_slave_switchdev_event-if-w.patch
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1653,6 +1653,9 @@ static int dsa_slave_switchdev_event(str
+@@ -1651,6 +1651,9 @@ static int dsa_slave_switchdev_event(str
  
  		dp = dsa_slave_to_port(dev);
  
diff --git a/target/linux/generic/backport-5.4/775-v5.12-net-dsa-listen-for-SWITCHDEV_-FDB-DEL-_ADD_TO_DEVICE.patch b/target/linux/generic/backport-5.4/775-v5.12-net-dsa-listen-for-SWITCHDEV_-FDB-DEL-_ADD_TO_DEVICE.patch
index e4ed6e808f..e49a97c81d 100644
--- a/target/linux/generic/backport-5.4/775-v5.12-net-dsa-listen-for-SWITCHDEV_-FDB-DEL-_ADD_TO_DEVICE.patch
+++ b/target/linux/generic/backport-5.4/775-v5.12-net-dsa-listen-for-SWITCHDEV_-FDB-DEL-_ADD_TO_DEVICE.patch
@@ -172,7 +172,7 @@ Signed-off-by: DENG Qingfang <dqfext at gmail.com>
  	 */
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1630,6 +1630,25 @@ static void dsa_slave_switchdev_event_wo
+@@ -1628,6 +1628,25 @@ static void dsa_slave_switchdev_event_wo
  		dev_put(dp->slave);
  }
  
@@ -198,7 +198,7 @@ Signed-off-by: DENG Qingfang <dqfext at gmail.com>
  /* Called under rcu_read_lock() */
  static int dsa_slave_switchdev_event(struct notifier_block *unused,
  				     unsigned long event, void *ptr)
-@@ -1648,10 +1667,37 @@ static int dsa_slave_switchdev_event(str
+@@ -1646,10 +1665,37 @@ static int dsa_slave_switchdev_event(str
  		return notifier_from_errno(err);
  	case SWITCHDEV_FDB_ADD_TO_DEVICE:
  	case SWITCHDEV_FDB_DEL_TO_DEVICE:
@@ -239,7 +239,7 @@ Signed-off-by: DENG Qingfang <dqfext at gmail.com>
  
  		if (!dp->ds->ops->port_fdb_add || !dp->ds->ops->port_fdb_del)
  			return NOTIFY_DONE;
-@@ -1666,18 +1712,13 @@ static int dsa_slave_switchdev_event(str
+@@ -1664,18 +1710,13 @@ static int dsa_slave_switchdev_event(str
  		switchdev_work->port = dp->index;
  		switchdev_work->event = event;
  
diff --git a/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch
index 369a09caac..ff41a17c62 100644
--- a/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch
+++ b/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  #include "dsa_priv.h"
  
-@@ -1226,6 +1230,27 @@ static struct devlink_port *dsa_slave_ge
+@@ -1224,6 +1228,27 @@ static struct devlink_port *dsa_slave_ge
  	return dp->ds->devlink ? &dp->devlink_port : NULL;
  }
  
@@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static const struct net_device_ops dsa_slave_netdev_ops = {
  	.ndo_open	 	= dsa_slave_open,
  	.ndo_stop		= dsa_slave_close,
-@@ -1250,6 +1275,9 @@ static const struct net_device_ops dsa_s
+@@ -1248,6 +1273,9 @@ static const struct net_device_ops dsa_s
  	.ndo_vlan_rx_add_vid	= dsa_slave_vlan_rx_add_vid,
  	.ndo_vlan_rx_kill_vid	= dsa_slave_vlan_rx_kill_vid,
  	.ndo_get_devlink_port	= dsa_slave_get_devlink_port,
diff --git a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch
index c2dc35d134..93ed193747 100644
--- a/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch
+++ b/target/linux/generic/pending-5.4/761-net-dsa-mt7530-Support-EEE-features.patch
@@ -9,7 +9,7 @@ Content-Transfer-Encoding: 8bit
 Signed-off-by: René van Dorst <opensource at vdorst.com>
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1407,9 +1407,13 @@ static void mt7530_phylink_mac_config(st
+@@ -1408,9 +1408,13 @@ static void mt7530_phylink_mac_config(st
  	switch (state->speed) {
  	case SPEED_1000:
  		mcr_new |= PMCR_FORCE_SPEED_1000;
@@ -23,7 +23,7 @@ Signed-off-by: René van Dorst <opensource at vdorst.com>
  		break;
  	}
  	if (state->duplex == DUPLEX_FULL) {
-@@ -1545,6 +1549,54 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -1546,6 +1550,54 @@ mt7530_phylink_mac_link_state(struct dsa
  	return 1;
  }
  
@@ -78,7 +78,7 @@ Signed-off-by: René van Dorst <opensource at vdorst.com>
  static const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt7530_setup,
-@@ -1572,6 +1624,8 @@ static const struct dsa_switch_ops mt753
+@@ -1573,6 +1625,8 @@ static const struct dsa_switch_ops mt753
  	.phylink_mac_config	= mt7530_phylink_mac_config,
  	.phylink_mac_link_down	= mt7530_phylink_mac_link_down,
  	.phylink_mac_link_up	= mt7530_phylink_mac_link_up,
diff --git a/target/linux/generic/pending-5.4/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch b/target/linux/generic/pending-5.4/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch
index d951246260..4c0c4391a3 100644
--- a/target/linux/generic/pending-5.4/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch
+++ b/target/linux/generic/pending-5.4/765-net-dsa-Include-local-addresses-in-assisted-CPU-port.patch
@@ -18,7 +18,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1698,10 +1698,12 @@ static int dsa_slave_switchdev_event(str
+@@ -1696,10 +1696,12 @@ static int dsa_slave_switchdev_event(str
  		fdb_info = ptr;
  
  		if (dsa_slave_dev_check(dev)) {
diff --git a/target/linux/generic/pending-5.4/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch b/target/linux/generic/pending-5.4/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch
index 46504aeeff..14f62ec19a 100644
--- a/target/linux/generic/pending-5.4/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch
+++ b/target/linux/generic/pending-5.4/766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch
@@ -15,7 +15,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1712,7 +1712,11 @@ static int dsa_slave_switchdev_event(str
+@@ -1710,7 +1710,11 @@ static int dsa_slave_switchdev_event(str
  			struct net_device *br_dev;
  			struct dsa_slave_priv *p;
  
diff --git a/target/linux/generic/pending-5.4/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch b/target/linux/generic/pending-5.4/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch
index e626086bc1..33f49685bf 100644
--- a/target/linux/generic/pending-5.4/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch
+++ b/target/linux/generic/pending-5.4/767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch
@@ -28,7 +28,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/net/dsa/slave.c
 +++ b/net/dsa/slave.c
-@@ -1705,9 +1705,12 @@ static int dsa_slave_switchdev_event(str
+@@ -1703,9 +1703,12 @@ static int dsa_slave_switchdev_event(str
  			else if (!fdb_info->added_by_user)
  				return NOTIFY_OK;
  		} else {
@@ -44,7 +44,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
  			 */
  			struct net_device *br_dev;
  			struct dsa_slave_priv *p;
-@@ -1729,7 +1732,8 @@ static int dsa_slave_switchdev_event(str
+@@ -1727,7 +1730,8 @@ static int dsa_slave_switchdev_event(str
  
  			dp = p->dp->cpu_dp;
  
diff --git a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 65b0e1084e..dc9e61eb9d 100644
--- a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -5082,6 +5082,7 @@ static int mv88e6xxx_register_switch(str
+@@ -5083,6 +5083,7 @@ static int mv88e6xxx_register_switch(str
  	ds->ops = &mv88e6xxx_switch_ops;
  	ds->ageing_time_min = chip->info->age_time_coeff;
  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
diff --git a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
index 72b101bfb0..8214e1a310 100644
--- a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
+++ b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
@@ -648,7 +648,7 @@ Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1 at nxp.com>
  static const u32 vsc9959_gcb_regmap[] = {
 --- a/include/net/dsa.h
 +++ b/include/net/dsa.h
-@@ -559,6 +559,7 @@ struct dsa_switch_ops {
+@@ -560,6 +560,7 @@ struct dsa_switch_ops {
  	 */
  	netdev_tx_t (*port_deferred_xmit)(struct dsa_switch *ds, int port,
  					  struct sk_buff *skb);
diff --git a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch
index 22db45aced..6fc9a1643e 100644
--- a/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch
+++ b/target/linux/mediatek/patches-5.4/0601-net-dsa-propagate-resolved-link-config-via-mac_link_.patch
@@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1284,7 +1284,9 @@ EXPORT_SYMBOL(b53_phylink_mac_link_down)
+@@ -1297,7 +1297,9 @@ EXPORT_SYMBOL(b53_phylink_mac_link_down)
  void b53_phylink_mac_link_up(struct dsa_switch *ds, int port,
  			     unsigned int mode,
  			     phy_interface_t interface,
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/b53/b53_priv.h
 +++ b/drivers/net/dsa/b53/b53_priv.h
-@@ -337,7 +337,9 @@ void b53_phylink_mac_link_down(struct ds
+@@ -338,7 +338,9 @@ void b53_phylink_mac_link_down(struct ds
  void b53_phylink_mac_link_up(struct dsa_switch *ds, int port,
  			     unsigned int mode,
  			     phy_interface_t interface,
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct ethtool_eee *p = &priv->dev->ports[port].eee;
 --- a/drivers/net/dsa/lantiq_gswip.c
 +++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -1661,7 +1661,9 @@ static void gswip_phylink_mac_link_down(
+@@ -1662,7 +1662,9 @@ static void gswip_phylink_mac_link_down(
  static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
  				      unsigned int mode,
  				      phy_interface_t interface,
@@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1440,7 +1440,9 @@ static void mt7530_phylink_mac_link_down
+@@ -1441,7 +1441,9 @@ static void mt7530_phylink_mac_link_down
  static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port,
  				       unsigned int mode,
  				       phy_interface_t interface,
@@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
 --- a/include/net/dsa.h
 +++ b/include/net/dsa.h
-@@ -406,7 +406,9 @@ struct dsa_switch_ops {
+@@ -407,7 +407,9 @@ struct dsa_switch_ops {
  	void	(*phylink_mac_link_up)(struct dsa_switch *ds, int port,
  				       unsigned int mode,
  				       phy_interface_t interface,
diff --git a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch
index 23fba85252..57066a3607 100644
--- a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch
+++ b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	mutex_unlock(&priv->reg_mutex);
  }
-@@ -1395,8 +1384,7 @@ static void mt7530_phylink_mac_config(st
+@@ -1396,8 +1385,7 @@ static void mt7530_phylink_mac_config(st
  
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN |
  		   PMCR_BACKPR_EN | PMCR_FORCE_MODE;
  
-@@ -1404,26 +1392,6 @@ static void mt7530_phylink_mac_config(st
+@@ -1405,26 +1393,6 @@ static void mt7530_phylink_mac_config(st
  	if (port == 5 && dsa_is_user_port(ds, 5))
  		mcr_new |= PMCR_EXT_PHY;
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (mcr_new != mcr_cur)
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
-@@ -1434,7 +1402,7 @@ static void mt7530_phylink_mac_link_down
+@@ -1435,7 +1403,7 @@ static void mt7530_phylink_mac_link_down
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -97,7 +97,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void mt7530_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -1445,8 +1413,31 @@ static void mt7530_phylink_mac_link_up(s
+@@ -1446,8 +1414,31 @@ static void mt7530_phylink_mac_link_up(s
  				       bool tx_pause, bool rx_pause)
  {
  	struct mt7530_priv *priv = ds->priv;
diff --git a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch
index 718ed8ea2d..84579ac2c5 100644
--- a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch
+++ b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch
@@ -47,7 +47,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		return -EINVAL;
  	}
  
-@@ -1332,12 +1334,11 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -1333,12 +1335,11 @@ mt7530_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -63,7 +63,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  
  	switch (port) {
  	case 0: /* Internal phy */
-@@ -1346,33 +1347,114 @@ static void mt7530_phylink_mac_config(st
+@@ -1347,33 +1348,114 @@ static void mt7530_phylink_mac_config(st
  	case 3:
  	case 4:
  		if (state->interface != PHY_INTERFACE_MODE_GMII)
@@ -189,7 +189,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		return;
  	}
  
-@@ -1440,61 +1522,44 @@ static void mt7530_phylink_mac_link_up(s
+@@ -1441,61 +1523,44 @@ static void mt7530_phylink_mac_link_up(s
  	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
  }
  
@@ -274,7 +274,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  	phylink_set(mask, Pause);
  	phylink_set(mask, Asym_Pause);
  
-@@ -1590,12 +1655,45 @@ static int mt7530_set_mac_eee(struct dsa
+@@ -1591,12 +1656,45 @@ static int mt7530_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -323,7 +323,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  	.get_ethtool_stats	= mt7530_get_ethtool_stats,
  	.get_sset_count		= mt7530_get_sset_count,
  	.port_enable		= mt7530_port_enable,
-@@ -1612,18 +1710,43 @@ static const struct dsa_switch_ops mt753
+@@ -1613,18 +1711,43 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_del		= mt7530_port_vlan_del,
  	.port_mirror_add	= mt7530_port_mirror_add,
  	.port_mirror_del	= mt7530_port_mirror_del,
@@ -372,7 +372,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  	{ /* sentinel */ },
  };
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
-@@ -1661,8 +1784,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -1662,8 +1785,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	/* Get the hardware identifier from the devicetree node.
  	 * We will need it for some of the clock and regulator setup.
  	 */
diff --git a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch
index 8ede862204..95dddf68b0 100644
--- a/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch
+++ b/target/linux/mediatek/patches-5.4/0604-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch
@@ -466,7 +466,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  	}
  }
  
-@@ -1280,7 +1619,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -1281,7 +1620,7 @@ mt7530_setup(struct dsa_switch *ds)
  			   PCR_MATRIX_CLR);
  
  		if (dsa_is_cpu_port(ds, i))
@@ -475,7 +475,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		else
  			mt7530_port_disable(ds, i);
  
-@@ -1334,6 +1673,118 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -1335,6 +1674,118 @@ mt7530_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -594,7 +594,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static bool
  mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -1372,6 +1823,47 @@ unsupported:
+@@ -1373,6 +1824,47 @@ unsupported:
  	return false;
  }
  
@@ -642,7 +642,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static bool
  mt753x_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -1404,6 +1896,227 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -1405,6 +1897,227 @@ mt7530_mac_config(struct dsa_switch *ds,
  	return 0;
  }
  
@@ -870,7 +870,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static int
  mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  const struct phylink_link_state *state)
-@@ -1439,6 +2152,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -1440,6 +2153,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (mt753x_mac_config(ds, port, mode, state) < 0)
  			goto unsupported;
  
@@ -879,7 +879,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		break;
  	case 6: /* 1st cpu port */
  		if (priv->p6_interface == state->interface)
-@@ -1458,7 +2173,8 @@ unsupported:
+@@ -1459,7 +2174,8 @@ unsupported:
  		return;
  	}
  
@@ -889,7 +889,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		dev_err(ds->dev, "%s: in-band negotiation unsupported\n",
  			__func__);
  		return;
-@@ -1468,7 +2184,7 @@ unsupported:
+@@ -1469,7 +2185,7 @@ unsupported:
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
  	mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN |
@@ -898,7 +898,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  
  	/* Are we connected to external phy */
  	if (port == 5 && dsa_is_user_port(ds, 5))
-@@ -1478,7 +2194,18 @@ unsupported:
+@@ -1479,7 +2195,18 @@ unsupported:
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
  
@@ -918,7 +918,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  					 unsigned int mode,
  					 phy_interface_t interface)
  {
-@@ -1487,7 +2214,19 @@ static void mt7530_phylink_mac_link_down
+@@ -1488,7 +2215,19 @@ static void mt7530_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -939,7 +939,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  				       unsigned int mode,
  				       phy_interface_t interface,
  				       struct phy_device *phydev,
-@@ -1497,18 +2236,29 @@ static void mt7530_phylink_mac_link_up(s
+@@ -1498,18 +2237,29 @@ static void mt7530_phylink_mac_link_up(s
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr;
  
@@ -971,7 +971,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		break;
  	}
  	if (duplex == DUPLEX_FULL) {
-@@ -1522,6 +2272,45 @@ static void mt7530_phylink_mac_link_up(s
+@@ -1523,6 +2273,45 @@ static void mt7530_phylink_mac_link_up(s
  	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
  }
  
@@ -1017,7 +1017,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
  			 unsigned long *supported)
-@@ -1530,6 +2319,14 @@ mt7530_mac_port_validate(struct dsa_swit
+@@ -1531,6 +2320,14 @@ mt7530_mac_port_validate(struct dsa_swit
  		phylink_set(supported, 1000baseX_Full);
  }
  
@@ -1032,7 +1032,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static void
  mt753x_phylink_validate(struct dsa_switch *ds, int port,
  			unsigned long *supported,
-@@ -1546,7 +2343,8 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -1547,7 +2344,8 @@ mt753x_phylink_validate(struct dsa_switc
  
  	phylink_set_port_modes(mask);
  
@@ -1042,7 +1042,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  		phylink_set(mask, 10baseT_Half);
  		phylink_set(mask, 10baseT_Full);
  		phylink_set(mask, 100baseT_Half);
-@@ -1565,6 +2363,11 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -1566,6 +2364,11 @@ mt753x_phylink_validate(struct dsa_switc
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
@@ -1054,7 +1054,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  }
  
  static int
-@@ -1655,6 +2458,63 @@ static int mt7530_set_mac_eee(struct dsa
+@@ -1656,6 +2459,63 @@ static int mt7530_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -1118,7 +1118,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  static int
  mt753x_phylink_mac_link_state(struct dsa_switch *ds, int port,
  			      struct phylink_link_state *state)
-@@ -1708,13 +2568,14 @@ static const struct dsa_switch_ops mt753
+@@ -1709,13 +2569,14 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_prepare	= mt7530_port_vlan_prepare,
  	.port_vlan_add		= mt7530_port_vlan_add,
  	.port_vlan_del		= mt7530_port_vlan_del,
@@ -1137,7 +1137,7 @@ Signed-off-by: Sean Wang <sean.wang at mediatek.com>
  	.get_mac_eee		= mt7530_get_mac_eee,
  	.set_mac_eee		= mt7530_set_mac_eee,
  };
-@@ -1742,11 +2603,26 @@ static const struct mt753x_info mt753x_t
+@@ -1743,11 +2604,26 @@ static const struct mt753x_info mt753x_t
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},




More information about the lede-commits mailing list