diff options
Diffstat (limited to 'target/linux/generic/backport-5.4')
15 files changed, 495 insertions, 28 deletions
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@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@gmail.com> +Signed-off-by: David S. Miller <davem@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@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@gmail.com> +Signed-off-by: David S. Miller <davem@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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; |