aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2022-01-07 23:32:59 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-03-27 00:07:34 +0000
commit7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50 (patch)
tree550c2171bb6beb79b12a3b3a869df22e4e27c3d6
parentfc8778981fb4240d87dec182181eff685dc76633 (diff)
downloadupstream-7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50.tar.gz
upstream-7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50.tar.bz2
upstream-7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50.zip
generic: 5.15: qca8k: refresh backport patches
Refresh qca8k backport patches for 5.15 kernel. Vlan_prepare is now dropped and there were some changes to vlan add/remove functions. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
-rw-r--r--target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch6
-rw-r--r--target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch2
-rw-r--r--target/linux/generic/backport-5.15/753-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch7
-rw-r--r--target/linux/generic/backport-5.15/754-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch66
-rw-r--r--target/linux/generic/backport-5.15/755-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch5
-rw-r--r--target/linux/generic/backport-5.15/756-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch7
-rw-r--r--target/linux/generic/backport-5.15/757-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch17
-rw-r--r--target/linux/generic/backport-5.15/758-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch17
-rw-r--r--target/linux/generic/backport-5.15/759-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch11
-rw-r--r--target/linux/generic/backport-5.15/760-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch19
-rw-r--r--target/linux/generic/backport-5.15/761-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch25
11 files changed, 119 insertions, 63 deletions
diff --git a/target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch b/target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
index df9518d86c..430329e23b 100644
--- a/target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
+++ b/target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
@@ -18,9 +18,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index a429c9750add1b..d7bcecbc1c5300 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -1433,6 +1433,12 @@ qca8k_phylink_mac_config(struct dsa_swit
+@@ -1433,6 +1433,12 @@ qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val);
@@ -33,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* For qca8327/qca8328/qca8334/qca8338 sgmii is unique and
* falling edge is set writing in the PORT0 PAD reg
*/
-@@ -1455,12 +1461,6 @@ qca8k_phylink_mac_config(struct dsa_swit
+@@ -1455,12 +1461,6 @@ qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE,
val);
diff --git a/target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch b/target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
index 7348d93ec4..721a59108b 100644
--- a/target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
+++ b/target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
@@ -28,6 +28,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index d7bcecbc1c5300..147ca39531a3bb 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1256,8 +1256,12 @@ qca8k_setup(struct dsa_switch *ds)
diff --git a/target/linux/generic/backport-5.15/753-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch b/target/linux/generic/backport-5.15/753-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
index f477b1b929..d86f6156a5 100644
--- a/target/linux/generic/backport-5.15/753-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
+++ b/target/linux/generic/backport-5.15/753-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
@@ -16,9 +16,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index a429c9750add1..bfffc1fb7016d 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -983,7 +983,7 @@ qca8k_parse_port_config(struct qca8k_pri
+@@ -983,7 +983,7 @@ qca8k_parse_port_config(struct qca8k_priv *priv)
u32 delay;
/* We have 2 CPU port. Check them */
@@ -27,3 +29,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Skip every other port */
if (port != 0 && port != 6)
continue;
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/754-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch b/target/linux/generic/backport-5.15/754-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
index c1489fd9a8..a37ab8b848 100644
--- a/target/linux/generic/backport-5.15/754-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
+++ b/target/linux/generic/backport-5.15/754-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
@@ -14,6 +14,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.h | 153 ++++++++++++++++++++++++++----------------------
2 files changed, 130 insertions(+), 121 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index bfffc1fb7016d..0eceb9cba2dc8 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -9,6 +9,7 @@
@@ -24,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#include <net/dsa.h>
#include <linux/of_net.h>
#include <linux/of_mdio.h>
-@@ -319,18 +320,18 @@ qca8k_fdb_read(struct qca8k_priv *priv,
+@@ -319,18 +320,18 @@ qca8k_fdb_read(struct qca8k_priv *priv, struct qca8k_fdb *fdb)
}
/* vid - 83:72 */
@@ -52,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -343,18 +344,18 @@ qca8k_fdb_write(struct qca8k_priv *priv,
+@@ -343,18 +344,18 @@ qca8k_fdb_write(struct qca8k_priv *priv, u16 vid, u8 port_mask, const u8 *mac,
int i;
/* vid - 83:72 */
@@ -80,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* load the array into the ARL table */
for (i = 0; i < 3; i++)
-@@ -372,7 +373,7 @@ qca8k_fdb_access(struct qca8k_priv *priv
+@@ -372,7 +373,7 @@ qca8k_fdb_access(struct qca8k_priv *priv, enum qca8k_fdb_cmd cmd, int port)
reg |= cmd;
if (port >= 0) {
reg |= QCA8K_ATU_FUNC_PORT_EN;
@@ -89,7 +91,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
/* Write the function register triggering the table access */
-@@ -454,7 +455,7 @@ qca8k_vlan_access(struct qca8k_priv *pri
+@@ -454,7 +455,7 @@ qca8k_vlan_access(struct qca8k_priv *priv, enum qca8k_vlan_cmd cmd, u16 vid)
/* Set the command and VLAN index */
reg = QCA8K_VTU_FUNC1_BUSY;
reg |= cmd;
@@ -98,7 +100,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Write the function register triggering the table access */
ret = qca8k_write(priv, QCA8K_REG_VTU_FUNC1, reg);
-@@ -500,13 +501,11 @@ qca8k_vlan_add(struct qca8k_priv *priv,
+@@ -500,13 +501,11 @@ qca8k_vlan_add(struct qca8k_priv *priv, u8 port, u16 vid, bool untagged)
if (ret < 0)
goto out;
reg |= QCA8K_VTU_FUNC0_VALID | QCA8K_VTU_FUNC0_IVL_EN;
@@ -115,7 +117,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = qca8k_write(priv, QCA8K_REG_VTU_FUNC0, reg);
if (ret)
-@@ -534,15 +533,13 @@ qca8k_vlan_del(struct qca8k_priv *priv,
+@@ -534,15 +533,13 @@ qca8k_vlan_del(struct qca8k_priv *priv, u8 port, u16 vid)
ret = qca8k_read(priv, QCA8K_REG_VTU_FUNC0, &reg);
if (ret < 0)
goto out;
@@ -134,7 +136,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if ((reg & mask) != mask) {
del = false;
-@@ -1014,7 +1011,7 @@ qca8k_parse_port_config(struct qca8k_pri
+@@ -1014,7 +1011,7 @@ qca8k_parse_port_config(struct qca8k_priv *priv)
mode == PHY_INTERFACE_MODE_RGMII_TXID)
delay = 1;
@@ -143,7 +145,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value");
delay = 3;
}
-@@ -1030,7 +1027,7 @@ qca8k_parse_port_config(struct qca8k_pri
+@@ -1030,7 +1027,7 @@ qca8k_parse_port_config(struct qca8k_priv *priv)
mode == PHY_INTERFACE_MODE_RGMII_RXID)
delay = 2;
@@ -207,7 +209,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
QCA8K_PORT_HOL_CTRL1_EG_PRI_BUF_EN |
QCA8K_PORT_HOL_CTRL1_EG_PORT_BUF_EN |
QCA8K_PORT_HOL_CTRL1_WRED_EN,
-@@ -1269,8 +1264,8 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1265,8 +1260,8 @@ qca8k_setup(struct dsa_switch *ds)
mask = QCA8K_GLOBAL_FC_GOL_XON_THRES(288) |
QCA8K_GLOBAL_FC_GOL_XOFF_THRES(496);
qca8k_rmw(priv, QCA8K_REG_GLOBAL_FC_THRESH,
@@ -218,35 +220,34 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mask);
}
-@@ -1918,11 +1913,11 @@ qca8k_port_vlan_filtering(struct dsa_swi
+@@ -1912,11 +1907,11 @@ qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
if (vlan_filtering) {
- qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
-- QCA8K_PORT_LOOKUP_VLAN_MODE,
-+ QCA8K_PORT_LOOKUP_VLAN_MODE_MASK,
- QCA8K_PORT_LOOKUP_VLAN_MODE_SECURE);
+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
+- QCA8K_PORT_LOOKUP_VLAN_MODE,
++ QCA8K_PORT_LOOKUP_VLAN_MODE_MASK,
+ QCA8K_PORT_LOOKUP_VLAN_MODE_SECURE);
} else {
- qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
-- QCA8K_PORT_LOOKUP_VLAN_MODE,
-+ QCA8K_PORT_LOOKUP_VLAN_MODE_MASK,
- QCA8K_PORT_LOOKUP_VLAN_MODE_NONE);
+ ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
+- QCA8K_PORT_LOOKUP_VLAN_MODE,
++ QCA8K_PORT_LOOKUP_VLAN_MODE_MASK,
+ QCA8K_PORT_LOOKUP_VLAN_MODE_NONE);
}
-@@ -1953,11 +1948,9 @@ qca8k_port_vlan_add(struct dsa_switch *d
- dev_err(priv->dev, "Failed to add VLAN to port %d (%d)", port, ret);
+@@ -1940,10 +1935,9 @@ qca8k_port_vlan_add(struct dsa_switch *ds, int port,
+ }
if (pvid) {
- int shift = 16 * (port % 2);
-
- qca8k_rmw(priv, QCA8K_EGRESS_VLAN(port),
-- 0xfff << shift,
-- vlan->vid_end << shift);
-+ QCA8K_EGREES_VLAN_PORT_MASK(port),
-+ QCA8K_EGREES_VLAN_PORT(port, vlan->vid_end));
- qca8k_write(priv, QCA8K_REG_PORT_VLAN_CTRL0(port),
- QCA8K_PORT_VLAN_CVID(vlan->vid_end) |
- QCA8K_PORT_VLAN_SVID(vlan->vid_end));
-@@ -2050,7 +2043,7 @@ static int qca8k_read_switch_id(struct q
+ ret = qca8k_rmw(priv, QCA8K_EGRESS_VLAN(port),
+- 0xfff << shift, vlan->vid << shift);
++ QCA8K_EGREES_VLAN_PORT_MASK(port),
++ QCA8K_EGREES_VLAN_PORT(port, vlan->vid));
+ if (ret)
+ return ret;
+
+@@ -2037,7 +2031,7 @@ static int qca8k_read_switch_id(struct qca8k_priv *priv)
if (ret < 0)
return -ENODEV;
@@ -255,7 +256,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (id != data->id) {
dev_err(priv->dev, "Switch id detected %x but expected %x", id, data->id);
return -ENODEV;
-@@ -2059,7 +2052,7 @@ static int qca8k_read_switch_id(struct q
+@@ -2046,7 +2040,7 @@ static int qca8k_read_switch_id(struct qca8k_priv *priv)
priv->switch_id = id;
/* Save revision to communicate to the internal PHY driver */
@@ -264,6 +265,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
+diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
+index 128b8cf85e080..085885275398b 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -30,9 +30,9 @@
@@ -506,3 +509,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define QCA8K_EGRESS_VLAN(x) (0x0c70 + (4 * (x / 2)))
/* L3 registers */
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/755-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch b/target/linux/generic/backport-5.15/755-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
index 8c39b8ea29..e5f3edfa51 100644
--- a/target/linux/generic/backport-5.15/755-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
+++ b/target/linux/generic/backport-5.15/755-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
@@ -12,6 +12,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 2 --
1 file changed, 2 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index 0eceb9cba2dc8..ae02043a52079 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1086,8 +1086,6 @@ qca8k_setup(struct dsa_switch *ds)
@@ -23,3 +25,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Start by setting up the register mapping */
priv->regmap = devm_regmap_init(ds->dev, NULL, priv,
&qca8k_regmap_config);
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/756-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch b/target/linux/generic/backport-5.15/756-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
index 9fcc74a7ce..f67abf901b 100644
--- a/target/linux/generic/backport-5.15/756-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
+++ b/target/linux/generic/backport-5.15/756-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
@@ -14,6 +14,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index ae02043a52079..f63a432916360 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1086,12 +1086,6 @@ qca8k_setup(struct dsa_switch *ds)
@@ -29,7 +31,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = qca8k_setup_mdio_bus(priv);
if (ret)
return ret;
-@@ -2085,6 +2079,14 @@ qca8k_sw_probe(struct mdio_device *mdiod
+@@ -2073,6 +2067,14 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
gpiod_set_value_cansleep(priv->reset_gpio, 0);
}
@@ -44,3 +46,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Check the detected switch id */
ret = qca8k_read_switch_id(priv);
if (ret)
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/757-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch b/target/linux/generic/backport-5.15/757-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
index 4ca9c8ba41..e0a9c809d8 100644
--- a/target/linux/generic/backport-5.15/757-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
+++ b/target/linux/generic/backport-5.15/757-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
@@ -23,6 +23,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 107 +++++++++++++++++++++---------------------------
1 file changed, 47 insertions(+), 60 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index f63a432916360..d64a9af186beb 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -10,6 +10,7 @@
@@ -33,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#include <net/dsa.h>
#include <linux/of_net.h>
#include <linux/of_mdio.h>
-@@ -152,6 +153,25 @@ qca8k_set_page(struct mii_bus *bus, u16
+@@ -152,6 +153,25 @@ qca8k_set_page(struct mii_bus *bus, u16 page)
static int
qca8k_read(struct qca8k_priv *priv, u32 reg, u32 *val)
{
@@ -116,7 +118,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct regmap_range qca8k_readable_ranges[] = {
regmap_reg_range(0x0000, 0x00e4), /* Global control */
regmap_reg_range(0x0100, 0x0168), /* EEE control */
-@@ -282,26 +276,19 @@ static struct regmap_config qca8k_regmap
+@@ -282,26 +276,19 @@ static struct regmap_config qca8k_regmap_config = {
.max_register = 0x16ac, /* end MIB - Port6 range */
.reg_read = qca8k_regmap_read,
.reg_write = qca8k_regmap_write,
@@ -166,7 +168,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (ret)
goto exit;
-@@ -597,9 +584,9 @@ qca8k_port_set_status(struct qca8k_priv
+@@ -597,9 +584,9 @@ qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
mask |= QCA8K_PORT_STATUS_LINK_AUTO;
if (enable)
@@ -178,7 +180,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static u32
-@@ -861,8 +848,8 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
+@@ -861,8 +848,8 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
* a dt-overlay and driver reload changed the configuration
*/
@@ -221,7 +223,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (ret)
return ret;
-@@ -1745,9 +1732,9 @@ qca8k_port_bridge_join(struct dsa_switch
+@@ -1741,9 +1728,9 @@ qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
/* Add this port to the portvlan mask of the other ports
* in the bridge
*/
@@ -234,7 +236,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (ret)
return ret;
if (i != port)
-@@ -1777,9 +1764,9 @@ qca8k_port_bridge_leave(struct dsa_switc
+@@ -1773,9 +1760,9 @@ qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
/* Remove this port to the portvlan mask of the other ports
* in the bridge
*/
@@ -247,3 +249,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
/* Set the cpu port to be the only one in the portvlan mask of
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/758-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch b/target/linux/generic/backport-5.15/758-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
index 78bdf7f77d..e889a7f5b2 100644
--- a/target/linux/generic/backport-5.15/758-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
+++ b/target/linux/generic/backport-5.15/758-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
@@ -17,9 +17,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.h | 4 ++++
2 files changed, 24 insertions(+), 3 deletions(-)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index d64a9af186beb..bedaaa6b9a1df 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -70,6 +70,8 @@ static const struct qca8k_mib_desc ar832
+@@ -70,6 +70,8 @@ static const struct qca8k_mib_desc ar8327_mib[] = {
MIB_DESC(1, 0x9c, "TxExcDefer"),
MIB_DESC(1, 0xa0, "TxDefer"),
MIB_DESC(1, 0xa4, "TxLateCol"),
@@ -28,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
/* The 32bit switch registers are accessed indirectly. To achieve this we need
-@@ -1605,12 +1607,16 @@ qca8k_phylink_mac_link_up(struct dsa_swi
+@@ -1601,12 +1603,16 @@ qca8k_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode,
static void
qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data)
{
@@ -46,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
strncpy(data + i * ETH_GSTRING_LEN, ar8327_mib[i].name,
ETH_GSTRING_LEN);
}
-@@ -1620,12 +1626,15 @@ qca8k_get_ethtool_stats(struct dsa_switc
+@@ -1616,12 +1622,15 @@ qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
uint64_t *data)
{
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
@@ -63,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mib = &ar8327_mib[i];
reg = QCA8K_PORT_MIB_COUNTER(port) + mib->offset;
-@@ -1648,10 +1657,15 @@ qca8k_get_ethtool_stats(struct dsa_switc
+@@ -1644,10 +1653,15 @@ qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
static int
qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset)
{
@@ -80,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static int
-@@ -2146,14 +2160,17 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
+@@ -2150,14 +2164,17 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
static const struct qca8k_match_data qca8327 = {
.id = QCA8K_ID_QCA8327,
.reduced_package = true,
@@ -98,6 +100,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct of_device_id qca8k_of_match[] = {
+diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
+index 085885275398b..91c94dfc9789d 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -21,6 +21,9 @@
@@ -118,3 +122,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
enum {
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/759-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch b/target/linux/generic/backport-5.15/759-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
index 41efa89b5e..877223b5d2 100644
--- a/target/linux/generic/backport-5.15/759-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
+++ b/target/linux/generic/backport-5.15/759-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
@@ -14,9 +14,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.h | 1 +
2 files changed, 12 insertions(+)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index bedaaa6b9a1df..d988df913ae02 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -1790,6 +1790,16 @@ qca8k_port_bridge_leave(struct dsa_switc
+@@ -1786,6 +1786,16 @@ qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
QCA8K_PORT_LOOKUP_MEMBER, BIT(cpu_port));
}
@@ -33,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int
qca8k_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
-@@ -2005,6 +2015,7 @@ static const struct dsa_switch_ops qca8k
+@@ -1994,6 +2004,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
.port_stp_state_set = qca8k_port_stp_state_set,
.port_bridge_join = qca8k_port_bridge_join,
.port_bridge_leave = qca8k_port_bridge_leave,
@@ -41,6 +43,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.port_fdb_add = qca8k_port_fdb_add,
.port_fdb_del = qca8k_port_fdb_del,
.port_fdb_dump = qca8k_port_fdb_dump,
+diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
+index 91c94dfc9789d..a533b8cf143be 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -262,6 +262,7 @@ enum qca8k_fdb_cmd {
@@ -51,3 +55,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
QCA8K_FDB_NEXT = 6,
QCA8K_FDB_SEARCH = 7,
};
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/760-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch b/target/linux/generic/backport-5.15/760-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
index f32e6ae93a..b851c9598b 100644
--- a/target/linux/generic/backport-5.15/760-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
+++ b/target/linux/generic/backport-5.15/760-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
@@ -16,9 +16,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.h | 3 +++
2 files changed, 28 insertions(+)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index d988df913ae02..45e769b9166b8 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -1261,6 +1261,10 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1257,6 +1257,10 @@ qca8k_setup(struct dsa_switch *ds)
/* We don't have interrupts for link changes, so we need to poll */
ds->pcs_poll = true;
@@ -29,10 +31,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -1801,6 +1805,26 @@ qca8k_port_fast_age(struct dsa_switch *d
+@@ -1796,6 +1800,26 @@ qca8k_port_fast_age(struct dsa_switch *ds, int port)
+ mutex_unlock(&priv->reg_mutex);
}
- static int
++static int
+qca8k_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
+{
+ struct qca8k_priv *priv = ds->priv;
@@ -52,11 +55,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ QCA8K_ATU_AGE_TIME(val));
+}
+
-+static int
+ static int
qca8k_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
- {
-@@ -2006,6 +2030,7 @@ static const struct dsa_switch_ops qca8k
+@@ -1995,6 +2019,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
.get_strings = qca8k_get_strings,
.get_ethtool_stats = qca8k_get_ethtool_stats,
.get_sset_count = qca8k_get_sset_count,
@@ -64,6 +66,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.get_mac_eee = qca8k_get_mac_eee,
.set_mac_eee = qca8k_set_mac_eee,
.port_enable = qca8k_port_enable,
+diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
+index a533b8cf143be..40ec8012622f7 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -175,6 +175,9 @@
@@ -76,3 +80,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define QCA8K_REG_GLOBAL_FW_CTRL0 0x620
#define QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN BIT(10)
#define QCA8K_REG_GLOBAL_FW_CTRL1 0x624
+--
+cgit 1.2.3-1.el7
+
diff --git a/target/linux/generic/backport-5.15/761-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch b/target/linux/generic/backport-5.15/761-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
index e0daa88c31..a71d7480da 100644
--- a/target/linux/generic/backport-5.15/761-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
+++ b/target/linux/generic/backport-5.15/761-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
@@ -18,12 +18,15 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
+diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
+index 45e769b9166b8..67742fbd80409 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -436,6 +436,81 @@ qca8k_fdb_flush(struct qca8k_priv *priv)
+@@ -435,6 +435,81 @@ qca8k_fdb_flush(struct qca8k_priv *priv)
+ mutex_unlock(&priv->reg_mutex);
}
- static int
++static int
+qca8k_fdb_search_and_insert(struct qca8k_priv *priv, u8 port_mask,
+ const u8 *mac, u16 vid)
+{
@@ -98,15 +101,14 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ return ret;
+}
+
-+static int
+ static int
qca8k_vlan_access(struct qca8k_priv *priv, enum qca8k_vlan_cmd cmd, u16 vid)
{
- u32 reg;
-@@ -1929,6 +2004,28 @@ qca8k_port_fdb_dump(struct dsa_switch *d
+@@ -1925,6 +2000,28 @@ qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
return 0;
}
-+static void
++static int
+qca8k_port_mdb_add(struct dsa_switch *ds, int port,
+ const struct switchdev_obj_port_mdb *mdb)
+{
@@ -114,7 +116,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ const u8 *addr = mdb->addr;
+ u16 vid = mdb->vid;
+
-+ qca8k_fdb_search_and_insert(priv, BIT(port), addr, vid);
++ return qca8k_fdb_search_and_insert(priv, BIT(port), addr, vid);
+}
+
+static int
@@ -130,13 +132,16 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+
static int
qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
- struct switchdev_trans *trans)
-@@ -2044,6 +2141,8 @@ static const struct dsa_switch_ops qca8k
+ struct netlink_ext_ack *extack)
+@@ -2033,6 +2130,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
.port_fdb_add = qca8k_port_fdb_add,
.port_fdb_del = qca8k_port_fdb_del,
.port_fdb_dump = qca8k_port_fdb_dump,
+ .port_mdb_add = qca8k_port_mdb_add,
+ .port_mdb_del = qca8k_port_mdb_del,
.port_vlan_filtering = qca8k_port_vlan_filtering,
- .port_vlan_prepare = qca8k_port_vlan_prepare,
.port_vlan_add = qca8k_port_vlan_add,
+ .port_vlan_del = qca8k_port_vlan_del,
+--
+cgit 1.2.3-1.el7
+