Use 'make target/linux/refresh' to refresh backport patches.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
--- a/Makefile
+++ b/Makefile
-@@ -507,7 +507,7 @@ KBUILD_LDFLAGS_MODULE :=
+@@ -523,7 +523,7 @@ KBUILD_LDFLAGS_MODULE :=
KBUILD_LDFLAGS :=
CLANG_FLAGS :=
-export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
+export ARCH SRCARCH SUBARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
- export PERL PYTHON PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
+ export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -3294,6 +3294,7 @@ S: Supported
+@@ -3428,6 +3428,7 @@ S: Supported
F: arch/arm64/net/
BPF JIT for MIPS (32-BIT AND 64-BIT)
L: bpf@vger.kernel.org
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -49,7 +49,6 @@ config MIPS
+@@ -57,7 +57,6 @@ config MIPS
select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
select HAVE_ASM_MODVERSIONS
select HAVE_CONTEXT_TRACKING
select HAVE_TIF_NOHZ
select HAVE_C_RECORDMCOUNT
-@@ -57,7 +56,10 @@ config MIPS
+@@ -65,7 +64,10 @@ config MIPS
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_DMA_CONTIGUOUS
select HAVE_DYNAMIC_FTRACE
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
-@@ -842,6 +842,7 @@ struct regmap *__regmap_init(struct devi
+@@ -877,6 +877,7 @@ struct regmap *__regmap_init(struct devi
if (!bus) {
map->reg_read = config->reg_read;
map->reg_write = config->reg_write;
goto skip_format_initialization;
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
-@@ -289,6 +289,11 @@ typedef void (*regmap_unlock)(void *);
+@@ -290,6 +290,11 @@ typedef void (*regmap_unlock)(void *);
* read operation on a bus such as SPI, I2C, etc. Most of the
* devices do not need this.
* @reg_write: Same as above for writing.
* @fast_io: Register IO is fast. Use a spinlock instead of a mutex
* to perform locking. This field is ignored if custom lock/unlock
* functions are used (see fields lock/unlock of struct regmap_config).
-@@ -366,6 +371,8 @@ struct regmap_config {
+@@ -372,6 +377,8 @@ struct regmap_config {
int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
int (*reg_write)(void *context, unsigned int reg, unsigned int val);
drivers/pinctrl/qcom/pinctrl-msm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
-index 8476a8ac4451..a42ff4b22a04 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
-@@ -1157,7 +1157,7 @@ static int msm_gpio_irq_set_affinity(struct irq_data *d,
+@@ -1157,7 +1157,7 @@ static int msm_gpio_irq_set_affinity(str
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
return irq_chip_set_affinity_parent(d, dest, force);
}
static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
-@@ -1168,7 +1168,7 @@ static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
+@@ -1168,7 +1168,7 @@ static int msm_gpio_irq_set_vcpu_affinit
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
return irq_chip_set_vcpu_affinity_parent(d, vcpu_info);
--- a/net/netfilter/nf_flow_table_core.c
+++ b/net/netfilter/nf_flow_table_core.c
-@@ -576,13 +576,41 @@ void nf_flow_table_free(struct nf_flowta
+@@ -646,13 +646,41 @@ void nf_flow_table_free(struct nf_flowta
}
EXPORT_SYMBOL_GPL(nf_flow_table_free);
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
-@@ -237,47 +237,14 @@ static struct nft_expr_type nft_flow_off
+@@ -438,47 +438,14 @@ static struct nft_expr_type nft_flow_off
.owner = THIS_MODULE,
};
net/dsa/switch.c | 14 +++++++++++
4 files changed, 96 insertions(+), 4 deletions(-)
-diff --git a/include/net/dsa.h b/include/net/dsa.h
-index bdf308a5c55ee..8b496c7e62ef8 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
-@@ -82,12 +82,15 @@ enum dsa_tag_protocol {
+@@ -80,12 +80,15 @@ enum dsa_tag_protocol {
};
struct dsa_switch;
unsigned int needed_headroom;
unsigned int needed_tailroom;
const char *name;
-@@ -337,6 +340,8 @@ struct dsa_switch {
+@@ -329,6 +332,8 @@ struct dsa_switch {
*/
void *priv;
/*
* Configuration data for this switch.
*/
-@@ -689,6 +694,13 @@ struct dsa_switch_ops {
+@@ -584,6 +589,13 @@ struct dsa_switch_ops {
enum dsa_tag_protocol mprot);
int (*change_tag_protocol)(struct dsa_switch *ds, int port,
enum dsa_tag_protocol proto);
/* Optional switch-wide initialization and destruction methods */
int (*setup)(struct dsa_switch *ds);
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index 8814fa0e44c84..cf65661686209 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -248,8 +248,12 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index)
+@@ -230,8 +230,12 @@ static struct dsa_switch_tree *dsa_tree_
static void dsa_tree_free(struct dsa_switch_tree *dst)
{
list_del(&dst->list);
kfree(dst);
}
-@@ -822,7 +826,7 @@ static int dsa_switch_setup_tag_protocol(struct dsa_switch *ds)
- int err;
+@@ -805,7 +809,7 @@ static int dsa_switch_setup_tag_protocol
+ int port, err;
if (tag_ops->proto == dst->default_proto)
- return 0;
+ goto connect;
- dsa_switch_for_each_cpu_port(cpu_dp, ds) {
- rtnl_lock();
-@@ -836,6 +840,17 @@ static int dsa_switch_setup_tag_protocol(struct dsa_switch *ds)
+ for (port = 0; port < ds->num_ports; port++) {
+ if (!dsa_is_cpu_port(ds, port))
+@@ -821,6 +825,17 @@ static int dsa_switch_setup_tag_protocol
}
}
return 0;
}
-@@ -1136,6 +1151,46 @@ static void dsa_tree_teardown(struct dsa_switch_tree *dst)
+@@ -1132,6 +1147,46 @@ static void dsa_tree_teardown(struct dsa
dst->setup = false;
}
/* Since the dsa/tagging sysfs device attribute is per master, the assumption
* is that all DSA switches within a tree share the same tagger, otherwise
* they would have formed disjoint trees (different "dsa,member" values).
-@@ -1168,12 +1223,15 @@ int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst,
+@@ -1164,12 +1219,15 @@ int dsa_tree_change_tag_proto(struct dsa
goto out_unlock;
}
rtnl_unlock();
-@@ -1260,6 +1318,7 @@ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master,
+@@ -1257,6 +1315,7 @@ static int dsa_port_parse_cpu(struct dsa
struct dsa_switch_tree *dst = ds->dst;
const struct dsa_device_ops *tag_ops;
enum dsa_tag_protocol default_proto;
/* Find out which protocol the switch would prefer. */
default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1307,6 +1366,12 @@ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master,
+@@ -1304,6 +1363,12 @@ static int dsa_port_parse_cpu(struct dsa
*/
dsa_tag_driver_put(tag_ops);
} else {
dst->tag_ops = tag_ops;
}
-diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
-index 38ce5129a33dc..0db2b26b0c83c 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -37,6 +37,7 @@ enum {
DSA_NOTIFIER_MRP_ADD,
DSA_NOTIFIER_MRP_DEL,
DSA_NOTIFIER_MRP_ADD_RING_ROLE,
-diff --git a/net/dsa/switch.c b/net/dsa/switch.c
-index 9c92edd969612..06948f5368296 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
-@@ -647,6 +647,17 @@ static int dsa_switch_change_tag_proto(struct dsa_switch *ds,
+@@ -616,6 +616,17 @@ static int dsa_switch_change_tag_proto(s
return 0;
}
static int dsa_switch_mrp_add(struct dsa_switch *ds,
struct dsa_notifier_mrp_info *info)
{
-@@ -766,6 +777,9 @@ static int dsa_switch_event(struct notifier_block *nb,
+@@ -735,6 +746,9 @@ static int dsa_switch_event(struct notif
case DSA_NOTIFIER_TAG_PROTO:
err = dsa_switch_change_tag_proto(ds, info);
break;
case DSA_NOTIFIER_MRP_ADD:
err = dsa_switch_mrp_add(ds, info);
break;
---
-cgit 1.2.3-1.el7
-
net/dsa/tag_sja1105.c | 67 ++++++++++++++++------------------------------
6 files changed, 109 insertions(+), 113 deletions(-)
-diff --git a/include/net/dsa.h b/include/net/dsa.h
-index 64d71968aa91a..f16959444ae12 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
-@@ -82,15 +82,14 @@ enum dsa_tag_protocol {
+@@ -80,15 +80,14 @@ enum dsa_tag_protocol {
};
struct dsa_switch;
unsigned int needed_headroom;
unsigned int needed_tailroom;
const char *name;
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index cf65661686209..c18b22c0bf55e 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -248,12 +248,8 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index)
+@@ -230,12 +230,8 @@ static struct dsa_switch_tree *dsa_tree_
static void dsa_tree_free(struct dsa_switch_tree *dst)
{
list_del(&dst->list);
kfree(dst);
}
-@@ -841,17 +837,29 @@ static int dsa_switch_setup_tag_protocol(struct dsa_switch *ds)
+@@ -826,17 +822,29 @@ static int dsa_switch_setup_tag_protocol
}
connect:
}
static int dsa_switch_setup(struct dsa_switch *ds)
-@@ -1160,13 +1168,6 @@ static int dsa_tree_bind_tag_proto(struct dsa_switch_tree *dst,
+@@ -1156,13 +1164,6 @@ static int dsa_tree_bind_tag_proto(struc
dst->tag_ops = tag_ops;
/* Notify the switches from this tree about the connection
* to the new tagger
*/
-@@ -1176,16 +1177,14 @@ static int dsa_tree_bind_tag_proto(struct dsa_switch_tree *dst,
+@@ -1172,16 +1173,14 @@ static int dsa_tree_bind_tag_proto(struc
goto out_disconnect;
/* Notify the old tagger about the disconnection from this tree */
dst->tag_ops = old_tag_ops;
return err;
-@@ -1318,7 +1317,6 @@ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master,
+@@ -1315,7 +1314,6 @@ static int dsa_port_parse_cpu(struct dsa
struct dsa_switch_tree *dst = ds->dst;
const struct dsa_device_ops *tag_ops;
enum dsa_tag_protocol default_proto;
/* Find out which protocol the switch would prefer. */
default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1366,12 +1364,6 @@ static int dsa_port_parse_cpu(struct dsa_port *dp, struct net_device *master,
+@@ -1363,12 +1361,6 @@ static int dsa_port_parse_cpu(struct dsa
*/
dsa_tag_driver_put(tag_ops);
} else {
dst->tag_ops = tag_ops;
}
-diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
-index 0db2b26b0c83c..edfaae7b59672 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -38,6 +38,7 @@ enum {
DSA_NOTIFIER_MRP_ADD,
DSA_NOTIFIER_MRP_DEL,
DSA_NOTIFIER_MRP_ADD_RING_ROLE,
-diff --git a/net/dsa/switch.c b/net/dsa/switch.c
-index 06948f5368296..393f2d8a860a9 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
-@@ -647,15 +647,58 @@ static int dsa_switch_change_tag_proto(struct dsa_switch *ds,
+@@ -616,15 +616,58 @@ static int dsa_switch_change_tag_proto(s
return 0;
}
}
static int dsa_switch_mrp_add(struct dsa_switch *ds,
-@@ -780,6 +823,9 @@ static int dsa_switch_event(struct notifier_block *nb,
+@@ -749,6 +792,9 @@ static int dsa_switch_event(struct notif
case DSA_NOTIFIER_TAG_PROTO_CONNECT:
err = dsa_switch_connect_tag_proto(ds, info);
break;
case DSA_NOTIFIER_MRP_ADD:
err = dsa_switch_mrp_add(ds, info);
break;
---
-cgit 1.2.3-1.el7
-
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -1328,6 +1328,19 @@ static struct phy_driver at803x_driver[]
+@@ -1420,6 +1420,19 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, };
module_phy_driver(at803x_driver);
-@@ -1338,6 +1351,8 @@ static struct mdio_device_id __maybe_unu
+@@ -1430,6 +1443,8 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_EXACT(ATH8032_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2288,7 +2288,7 @@ static const struct b53_chip_data b53_sw
+@@ -2302,7 +2302,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5325_DEVICE_ID,
.dev_name = "BCM5325",
.vlans = 16,
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
-@@ -2299,7 +2299,7 @@ static const struct b53_chip_data b53_sw
+@@ -2313,7 +2313,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5365_DEVICE_ID,
.dev_name = "BCM5365",
.vlans = 256,
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
-@@ -2310,7 +2310,7 @@ static const struct b53_chip_data b53_sw
+@@ -2324,7 +2324,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5389_DEVICE_ID,
.dev_name = "BCM5389",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2324,7 +2324,7 @@ static const struct b53_chip_data b53_sw
+@@ -2338,7 +2338,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5395_DEVICE_ID,
.dev_name = "BCM5395",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2338,7 +2338,7 @@ static const struct b53_chip_data b53_sw
+@@ -2352,7 +2352,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5397_DEVICE_ID,
.dev_name = "BCM5397",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2352,7 +2352,7 @@ static const struct b53_chip_data b53_sw
+@@ -2366,7 +2366,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM5398_DEVICE_ID,
.dev_name = "BCM5398",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2366,7 +2366,7 @@ static const struct b53_chip_data b53_sw
+@@ -2380,7 +2380,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53115_DEVICE_ID,
.dev_name = "BCM53115",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
-@@ -2380,7 +2380,7 @@ static const struct b53_chip_data b53_sw
+@@ -2394,7 +2394,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53125_DEVICE_ID,
.dev_name = "BCM53125",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2422,7 +2422,7 @@ static const struct b53_chip_data b53_sw
+@@ -2436,7 +2436,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53010_DEVICE_ID,
.dev_name = "BCM53010",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2464,7 +2464,7 @@ static const struct b53_chip_data b53_sw
+@@ -2478,7 +2478,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53018_DEVICE_ID,
.dev_name = "BCM53018",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2478,7 +2478,7 @@ static const struct b53_chip_data b53_sw
+@@ -2492,7 +2492,7 @@ static const struct b53_chip_data b53_sw
.chip_id = BCM53019_DEVICE_ID,
.dev_name = "BCM53019",
.vlans = 4096,
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
-@@ -2605,7 +2605,6 @@ static int b53_switch_init(struct b53_de
+@@ -2634,7 +2634,6 @@ static int b53_switch_init(struct b53_de
dev->cpu_port = 5;
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1256,12 +1256,6 @@ static void b53_adjust_link(struct dsa_s
+@@ -1291,12 +1291,6 @@ static void b53_adjust_link(struct dsa_s
return;
}
}
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1187,7 +1187,7 @@ static void b53_adjust_link(struct dsa_s
+@@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_s
return;
/* Enable flow control on BCM5301x's CPU port */
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2286,7 +2286,6 @@ static const struct b53_chip_data b53_sw
+@@ -2300,7 +2300,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
-@@ -2297,7 +2296,6 @@ static const struct b53_chip_data b53_sw
+@@ -2311,7 +2310,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 2,
.arl_buckets = 1024,
.imp_port = 5,
.duplex_reg = B53_DUPLEX_STAT_FE,
},
{
-@@ -2308,7 +2306,6 @@ static const struct b53_chip_data b53_sw
+@@ -2322,7 +2320,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2322,7 +2319,6 @@ static const struct b53_chip_data b53_sw
+@@ -2336,7 +2333,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2336,7 +2332,6 @@ static const struct b53_chip_data b53_sw
+@@ -2350,7 +2346,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2350,7 +2345,6 @@ static const struct b53_chip_data b53_sw
+@@ -2364,7 +2359,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_9798,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2365,7 +2359,6 @@ static const struct b53_chip_data b53_sw
+@@ -2379,7 +2373,6 @@ static const struct b53_chip_data b53_sw
.arl_buckets = 1024,
.vta_regs = B53_VTA_REGS,
.imp_port = 8,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
-@@ -2378,7 +2371,6 @@ static const struct b53_chip_data b53_sw
+@@ -2392,7 +2385,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2392,7 +2384,6 @@ static const struct b53_chip_data b53_sw
+@@ -2406,7 +2398,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2406,7 +2397,6 @@ static const struct b53_chip_data b53_sw
+@@ -2420,7 +2411,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS_63XX,
.duplex_reg = B53_DUPLEX_STAT_63XX,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
-@@ -2420,7 +2410,6 @@ static const struct b53_chip_data b53_sw
+@@ -2434,7 +2424,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2434,7 +2423,6 @@ static const struct b53_chip_data b53_sw
+@@ -2448,7 +2437,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2448,7 +2436,6 @@ static const struct b53_chip_data b53_sw
+@@ -2462,7 +2450,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2462,7 +2449,6 @@ static const struct b53_chip_data b53_sw
+@@ -2476,7 +2463,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2476,7 +2462,6 @@ static const struct b53_chip_data b53_sw
+@@ -2490,7 +2476,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2490,7 +2475,6 @@ static const struct b53_chip_data b53_sw
+@@ -2504,7 +2489,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2504,7 +2488,6 @@ static const struct b53_chip_data b53_sw
+@@ -2518,7 +2502,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2518,7 +2501,6 @@ static const struct b53_chip_data b53_sw
+@@ -2547,7 +2530,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 1024,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2532,7 +2514,6 @@ static const struct b53_chip_data b53_sw
+@@ -2561,7 +2543,6 @@ static const struct b53_chip_data b53_sw
.arl_bins = 4,
.arl_buckets = 256,
.imp_port = 8,
.vta_regs = B53_VTA_REGS,
.duplex_reg = B53_DUPLEX_STAT_GE,
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
-@@ -2558,7 +2539,6 @@ static int b53_switch_init(struct b53_de
+@@ -2587,7 +2568,6 @@ static int b53_switch_init(struct b53_de
dev->vta_regs[2] = chip->vta_regs[2];
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
dev->imp_port = chip->imp_port;
dev->num_vlans = chip->vlans;
dev->num_arl_bins = chip->arl_bins;
dev->num_arl_buckets = chip->arl_buckets;
-@@ -2590,13 +2570,6 @@ static int b53_switch_init(struct b53_de
+@@ -2619,13 +2599,6 @@ static int b53_switch_init(struct b53_de
break;
#endif
}
dev->num_ports = fls(dev->enabled_ports);
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
-@@ -123,7 +123,6 @@ struct b53_device {
+@@ -124,7 +124,6 @@ struct b53_device {
/* used ports mask */
u16 enabled_ports;
unsigned int imp_port;
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -148,7 +148,8 @@
- #define AT803X_PAGE_FIBER 0
- #define AT803X_PAGE_COPPER 1
+@@ -150,7 +150,8 @@
+ #define ATH8035_PHY_ID 0x004dd072
+ #define AT8030_PHY_ID_MASK 0xffffffef
-#define QCA8327_PHY_ID 0x004dd034
+#define QCA8327_A_PHY_ID 0x004dd033
#define QCA8337_PHY_ID 0x004dd036
#define QCA8K_PHY_ID_MASK 0xffffffff
-@@ -1329,10 +1330,23 @@ static struct phy_driver at803x_driver[]
+@@ -1421,10 +1422,23 @@ static struct phy_driver at803x_driver[]
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
/* PHY_GBIT_FEATURES */
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
-@@ -1352,7 +1366,8 @@ static struct mdio_device_id __maybe_unu
+@@ -1444,7 +1458,8 @@ static struct mdio_device_id __maybe_unu
{ PHY_ID_MATCH_EXACT(ATH8035_PHY_ID) },
{ PHY_ID_MATCH_EXACT(ATH9331_PHY_ID) },
{ PHY_ID_MATCH_EXACT(QCA8337_PHY_ID) },
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -1329,6 +1329,8 @@ static struct phy_driver at803x_driver[]
+@@ -1421,6 +1421,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
/* QCA8327-A from switch QCA8327-AL1A */
.phy_id = QCA8327_A_PHY_ID,
-@@ -1342,6 +1344,8 @@ static struct phy_driver at803x_driver[]
+@@ -1434,6 +1436,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
/* QCA8327-B from switch QCA8327-BL1A */
.phy_id = QCA8327_B_PHY_ID,
-@@ -1355,6 +1359,8 @@ static struct phy_driver at803x_driver[]
+@@ -1447,6 +1451,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -1318,47 +1318,47 @@ static struct phy_driver at803x_driver[]
+@@ -1410,47 +1410,47 @@ static struct phy_driver at803x_driver[]
.config_aneg = at803x_config_aneg,
}, {
/* QCA8337 */
#define AT803X_DEBUG_REG_1F 0x1F
#define AT803X_DEBUG_PLL_ON BIT(2)
-@@ -1220,6 +1225,58 @@ static int qca83xx_config_init(struct ph
+@@ -1312,6 +1317,58 @@ static int qca83xx_config_init(struct ph
return 0;
}
static struct phy_driver at803x_driver[] = {
{
/* Qualcomm Atheros AR8035 */
-@@ -1329,8 +1386,8 @@ static struct phy_driver at803x_driver[]
+@@ -1421,8 +1478,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
/* QCA8327-A from switch QCA8327-AL1A */
.phy_id = QCA8327_A_PHY_ID,
-@@ -1344,8 +1401,8 @@ static struct phy_driver at803x_driver[]
+@@ -1436,8 +1493,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
}, {
/* QCA8327-B from switch QCA8327-BL1A */
.phy_id = QCA8327_B_PHY_ID,
-@@ -1359,8 +1416,8 @@ static struct phy_driver at803x_driver[]
+@@ -1451,8 +1508,8 @@ static struct phy_driver at803x_driver[]
.get_sset_count = at803x_get_sset_count,
.get_strings = at803x_get_strings,
.get_stats = at803x_get_stats,
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -87,6 +87,8 @@
- #define AT803X_PSSR_MR_AN_COMPLETE 0x0200
+ #define AT803X_PSSR_MR_AN_COMPLETE 0x0200
#define AT803X_DEBUG_REG_0 0x00
+#define QCA8327_DEBUG_MANU_CTRL_EN BIT(2)
#define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15)
#define AT803X_DEBUG_REG_5 0x05
-@@ -1222,9 +1224,37 @@ static int qca83xx_config_init(struct ph
+@@ -1314,9 +1316,37 @@ static int qca83xx_config_init(struct ph
break;
}
static int qca83xx_resume(struct phy_device *phydev)
{
int ret, val;
-@@ -1379,6 +1409,7 @@ static struct phy_driver at803x_driver[]
+@@ -1471,6 +1501,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8337 internal PHY",
/* PHY_GBIT_FEATURES */
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
.config_init = qca83xx_config_init,
-@@ -1394,6 +1425,7 @@ static struct phy_driver at803x_driver[]
+@@ -1486,6 +1517,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8327-A internal PHY",
/* PHY_GBIT_FEATURES */
.probe = at803x_probe,
.flags = PHY_IS_INTERNAL,
.config_init = qca83xx_config_init,
-@@ -1409,6 +1441,7 @@ static struct phy_driver at803x_driver[]
+@@ -1501,6 +1533,7 @@ static struct phy_driver at803x_driver[]
.phy_id_mask = QCA8K_PHY_ID_MASK,
.name = "Qualcomm Atheros 8327-B internal PHY",
/* PHY_GBIT_FEATURES */
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -1233,6 +1233,9 @@ static int qca83xx_config_init(struct ph
+@@ -1325,6 +1325,9 @@ static int qca83xx_config_init(struct ph
at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
QCA8327_DEBUG_MANU_CTRL_EN, 0);
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -86,12 +86,12 @@
- #define AT803X_PSSR 0x11 /*PHY-Specific Status Register*/
- #define AT803X_PSSR_MR_AN_COMPLETE 0x0200
+ #define AT803X_PSSR 0x11 /*PHY-Specific Status Register*/
+ #define AT803X_PSSR_MR_AN_COMPLETE 0x0200
-#define AT803X_DEBUG_REG_0 0x00
+#define AT803X_DEBUG_ANALOG_TEST_CTRL 0x00
#define AT803X_DEBUG_GATE_CLK_IN1000 BIT(6)
#define AT803X_DEBUG_REG_1F 0x1F
-@@ -274,25 +274,25 @@ static int at803x_read_page(struct phy_d
+@@ -284,25 +284,25 @@ static int at803x_read_page(struct phy_d
static int at803x_enable_rx_delay(struct phy_device *phydev)
{
AT803X_DEBUG_TX_CLK_DLY_EN, 0);
}
-@@ -1208,9 +1208,9 @@ static int qca83xx_config_init(struct ph
+@@ -1300,9 +1300,9 @@ static int qca83xx_config_init(struct ph
switch (switch_revision) {
case 1:
/* For 100M waveform */
break;
case 2:
-@@ -1218,8 +1218,8 @@ static int qca83xx_config_init(struct ph
+@@ -1310,8 +1310,8 @@ static int qca83xx_config_init(struct ph
fallthrough;
case 4:
phy_write_mmd(phydev, MDIO_MMD_PCS, MDIO_AZ_DEBUG, 0x803f);
at803x_debug_reg_write(phydev, AT803X_DEBUG_REG_3C, 0x6000);
break;
}
-@@ -1230,7 +1230,7 @@ static int qca83xx_config_init(struct ph
+@@ -1322,7 +1322,7 @@ static int qca83xx_config_init(struct ph
*/
if (phydev->drv->phy_id == QCA8327_A_PHY_ID ||
phydev->drv->phy_id == QCA8327_B_PHY_ID)
QCA8327_DEBUG_MANU_CTRL_EN, 0);
/* Following original QCA sourcecode set port to prefer master */
-@@ -1248,12 +1248,12 @@ static void qca83xx_link_change_notify(s
+@@ -1340,12 +1340,12 @@ static void qca83xx_link_change_notify(s
/* Set DAC Amplitude adjustment to +6% for 100m on link running */
if (phydev->state == PHY_RUNNING) {
if (phydev->speed == SPEED_100)
QCA8327_DEBUG_MANU_CTRL_EN, 0);
}
}
-@@ -1300,7 +1300,7 @@ static int qca83xx_suspend(struct phy_de
+@@ -1392,7 +1392,7 @@ static int qca83xx_suspend(struct phy_de
phy_modify(phydev, MII_BMCR, mask, 0);
}
if (ret)
return ret;
}
-@@ -2098,7 +2105,12 @@ static int qca8k_resume(struct device *d
+@@ -2105,7 +2112,12 @@ static int qca8k_resume(struct device *d
static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
qca8k_suspend, qca8k_resume);
.id = QCA8K_ID_QCA8327,
};
-@@ -2107,7 +2119,8 @@ static const struct qca8k_match_data qca
+@@ -2114,7 +2126,8 @@ static const struct qca8k_match_data qca
};
static const struct of_device_id qca8k_of_match[] = {
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_switch *ds, int port, unsigned int mode,
+@@ -1433,6 +1433,12 @@ qca8k_phylink_mac_config(struct dsa_swit
qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val);
/* 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_switch *ds, int port, unsigned int mode,
+@@ -1455,12 +1461,6 @@ qca8k_phylink_mac_config(struct dsa_swit
QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE,
val);
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)
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_priv *priv)
+@@ -983,7 +983,7 @@ qca8k_parse_port_config(struct qca8k_pri
u32 delay;
/* We have 2 CPU port. Check them */
/* Skip every other port */
if (port != 0 && port != 6)
continue;
---
-cgit 1.2.3-1.el7
-
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 @@
#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, struct qca8k_fdb *fdb)
+@@ -319,18 +320,18 @@ qca8k_fdb_read(struct qca8k_priv *priv,
}
/* vid - 83:72 */
return 0;
}
-@@ -343,18 +344,18 @@ qca8k_fdb_write(struct qca8k_priv *priv, u16 vid, u8 port_mask, const u8 *mac,
+@@ -343,18 +344,18 @@ qca8k_fdb_write(struct qca8k_priv *priv,
int i;
/* vid - 83:72 */
/* load the array into the ARL table */
for (i = 0; i < 3; i++)
-@@ -372,7 +373,7 @@ qca8k_fdb_access(struct qca8k_priv *priv, enum qca8k_fdb_cmd cmd, int port)
+@@ -372,7 +373,7 @@ qca8k_fdb_access(struct qca8k_priv *priv
reg |= cmd;
if (port >= 0) {
reg |= QCA8K_ATU_FUNC_PORT_EN;
}
/* Write the function register triggering the table access */
-@@ -454,7 +455,7 @@ qca8k_vlan_access(struct qca8k_priv *priv, enum qca8k_vlan_cmd cmd, u16 vid)
+@@ -454,7 +455,7 @@ qca8k_vlan_access(struct qca8k_priv *pri
/* Set the command and VLAN index */
reg = QCA8K_VTU_FUNC1_BUSY;
reg |= cmd;
/* 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, u8 port, u16 vid, bool untagged)
+@@ -500,13 +501,11 @@ qca8k_vlan_add(struct qca8k_priv *priv,
if (ret < 0)
goto out;
reg |= QCA8K_VTU_FUNC0_VALID | QCA8K_VTU_FUNC0_IVL_EN;
ret = qca8k_write(priv, QCA8K_REG_VTU_FUNC0, reg);
if (ret)
-@@ -534,15 +533,13 @@ qca8k_vlan_del(struct qca8k_priv *priv, u8 port, u16 vid)
+@@ -534,15 +533,13 @@ qca8k_vlan_del(struct qca8k_priv *priv,
ret = qca8k_read(priv, QCA8K_REG_VTU_FUNC0, ®);
if (ret < 0)
goto out;
if ((reg & mask) != mask) {
del = false;
-@@ -1014,7 +1011,7 @@ qca8k_parse_port_config(struct qca8k_priv *priv)
+@@ -1014,7 +1011,7 @@ qca8k_parse_port_config(struct qca8k_pri
mode == PHY_INTERFACE_MODE_RGMII_TXID)
delay = 1;
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_priv *priv)
+@@ -1030,7 +1027,7 @@ qca8k_parse_port_config(struct qca8k_pri
mode == PHY_INTERFACE_MODE_RGMII_RXID)
delay = 2;
QCA8K_PORT_HOL_CTRL1_EG_PRI_BUF_EN |
QCA8K_PORT_HOL_CTRL1_EG_PORT_BUF_EN |
QCA8K_PORT_HOL_CTRL1_WRED_EN,
-@@ -1265,8 +1260,8 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1269,8 +1264,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,
mask);
}
-@@ -1912,11 +1907,11 @@ qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
+@@ -1916,11 +1911,11 @@ qca8k_port_vlan_filtering(struct dsa_swi
if (vlan_filtering) {
ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
QCA8K_PORT_LOOKUP_VLAN_MODE_NONE);
}
-@@ -1940,10 +1935,9 @@ qca8k_port_vlan_add(struct dsa_switch *ds, int port,
+@@ -1944,10 +1939,9 @@ qca8k_port_vlan_add(struct dsa_switch *d
}
if (pvid) {
if (ret)
return ret;
-@@ -2037,7 +2031,7 @@ static int qca8k_read_switch_id(struct qca8k_priv *priv)
+@@ -2041,7 +2035,7 @@ static int qca8k_read_switch_id(struct q
if (ret < 0)
return -ENODEV;
if (id != data->id) {
dev_err(priv->dev, "Switch id detected %x but expected %x", id, data->id);
return -ENODEV;
-@@ -2046,7 +2040,7 @@ static int qca8k_read_switch_id(struct qca8k_priv *priv)
+@@ -2050,7 +2044,7 @@ static int qca8k_read_switch_id(struct q
priv->switch_id = id;
/* Save revision to communicate to the internal PHY driver */
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 @@
#define QCA8K_EGRESS_VLAN(x) (0x0c70 + (4 * (x / 2)))
/* L3 registers */
---
-cgit 1.2.3-1.el7
-
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)
/* 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
-
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)
ret = qca8k_setup_mdio_bus(priv);
if (ret)
return ret;
-@@ -2073,6 +2067,14 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
+@@ -2077,6 +2071,14 @@ qca8k_sw_probe(struct mdio_device *mdiod
gpiod_set_value_cansleep(priv->reset_gpio, 0);
}
/* Check the detected switch id */
ret = qca8k_read_switch_id(priv);
if (ret)
---
-cgit 1.2.3-1.el7
-
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 @@
#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 page)
+@@ -152,6 +153,25 @@ qca8k_set_page(struct mii_bus *bus, u16
static int
qca8k_read(struct qca8k_priv *priv, u32 reg, u32 *val)
{
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_config = {
+@@ -282,26 +276,19 @@ static struct regmap_config qca8k_regmap
.max_register = 0x16ac, /* end MIB - Port6 range */
.reg_read = qca8k_regmap_read,
.reg_write = qca8k_regmap_write,
if (ret)
goto exit;
-@@ -597,9 +584,9 @@ qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
+@@ -597,9 +584,9 @@ qca8k_port_set_status(struct qca8k_priv
mask |= QCA8K_PORT_STATUS_LINK_AUTO;
if (enable)
}
static u32
-@@ -861,8 +848,8 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
+@@ -861,8 +848,8 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
* a dt-overlay and driver reload changed the configuration
*/
if (ret)
return ret;
-@@ -1741,9 +1728,9 @@ qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
+@@ -1745,9 +1732,9 @@ qca8k_port_bridge_join(struct dsa_switch
/* Add this port to the portvlan mask of the other ports
* in the bridge
*/
if (ret)
return ret;
if (i != port)
-@@ -1773,9 +1760,9 @@ qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
+@@ -1777,9 +1764,9 @@ qca8k_port_bridge_leave(struct dsa_switc
/* Remove this port to the portvlan mask of the other ports
* in the bridge
*/
}
/* Set the cpu port to be the only one in the portvlan mask of
---
-cgit 1.2.3-1.el7
-
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 ar8327_mib[] = {
+@@ -70,6 +70,8 @@ static const struct qca8k_mib_desc ar832
MIB_DESC(1, 0x9c, "TxExcDefer"),
MIB_DESC(1, 0xa0, "TxDefer"),
MIB_DESC(1, 0xa4, "TxLateCol"),
};
/* The 32bit switch registers are accessed indirectly. To achieve this we need
-@@ -1601,12 +1603,16 @@ qca8k_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode,
+@@ -1605,12 +1607,16 @@ qca8k_phylink_mac_link_up(struct dsa_swi
static void
qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data)
{
strncpy(data + i * ETH_GSTRING_LEN, ar8327_mib[i].name,
ETH_GSTRING_LEN);
}
-@@ -1616,12 +1622,15 @@ qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
+@@ -1620,12 +1626,15 @@ qca8k_get_ethtool_stats(struct dsa_switc
uint64_t *data)
{
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
mib = &ar8327_mib[i];
reg = QCA8K_PORT_MIB_COUNTER(port) + mib->offset;
-@@ -1644,10 +1653,15 @@ qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
+@@ -1648,10 +1657,15 @@ qca8k_get_ethtool_stats(struct dsa_switc
static int
qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset)
{
}
static int
-@@ -2150,14 +2164,17 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
+@@ -2154,14 +2168,17 @@ static SIMPLE_DEV_PM_OPS(qca8k_pm_ops,
static const struct qca8k_match_data qca8327 = {
.id = QCA8K_ID_QCA8327,
.reduced_package = true,
};
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 @@
};
enum {
---
-cgit 1.2.3-1.el7
-
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
-@@ -1786,6 +1786,16 @@ qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
+@@ -1790,6 +1790,16 @@ qca8k_port_bridge_leave(struct dsa_switc
QCA8K_PORT_LOOKUP_MEMBER, BIT(cpu_port));
}
static int
qca8k_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
-@@ -1994,6 +2004,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+@@ -1998,6 +2008,7 @@ static const struct dsa_switch_ops qca8k
.port_stp_state_set = qca8k_port_stp_state_set,
.port_bridge_join = qca8k_port_bridge_join,
.port_bridge_leave = qca8k_port_bridge_leave,
.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 {
QCA8K_FDB_NEXT = 6,
QCA8K_FDB_SEARCH = 7,
};
---
-cgit 1.2.3-1.el7
-
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
-@@ -1257,6 +1257,10 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1261,6 +1261,10 @@ qca8k_setup(struct dsa_switch *ds)
/* We don't have interrupts for link changes, so we need to poll */
ds->pcs_poll = true;
return 0;
}
-@@ -1796,6 +1800,26 @@ qca8k_port_fast_age(struct dsa_switch *ds, int port)
- mutex_unlock(&priv->reg_mutex);
+@@ -1801,6 +1805,26 @@ qca8k_port_fast_age(struct dsa_switch *d
}
-+static int
+ static int
+qca8k_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
+{
+ struct qca8k_priv *priv = ds->priv;
+ QCA8K_ATU_AGE_TIME(val));
+}
+
- static int
++static int
qca8k_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
-@@ -1995,6 +2019,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+ {
+@@ -1999,6 +2023,7 @@ static const struct dsa_switch_ops qca8k
.get_strings = qca8k_get_strings,
.get_ethtool_stats = qca8k_get_ethtool_stats,
.get_sset_count = qca8k_get_sset_count,
.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 @@
#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
-
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
-@@ -435,6 +435,81 @@ qca8k_fdb_flush(struct qca8k_priv *priv)
- mutex_unlock(&priv->reg_mutex);
+@@ -436,6 +436,81 @@ qca8k_fdb_flush(struct qca8k_priv *priv)
}
-+static int
+ static int
+qca8k_fdb_search_and_insert(struct qca8k_priv *priv, u8 port_mask,
+ const u8 *mac, u16 vid)
+{
+ return ret;
+}
+
- static int
++static int
qca8k_vlan_access(struct qca8k_priv *priv, enum qca8k_vlan_cmd cmd, u16 vid)
{
-@@ -1925,6 +2000,28 @@ qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
- return 0;
+ u32 reg;
+@@ -1930,6 +2005,28 @@ qca8k_port_fdb_dump(struct dsa_switch *d
}
-+static int
+ static int
+qca8k_port_mdb_add(struct dsa_switch *ds, int port,
+ const struct switchdev_obj_port_mdb *mdb)
+{
+ return qca8k_fdb_search_and_del(priv, BIT(port), addr, vid);
+}
+
- static int
++static int
qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
struct netlink_ext_ack *extack)
-@@ -2033,6 +2130,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+ {
+@@ -2037,6 +2134,8 @@ static const struct dsa_switch_ops qca8k
.port_fdb_add = qca8k_port_fdb_add,
.port_fdb_del = qca8k_port_fdb_del,
.port_fdb_dump = qca8k_port_fdb_dump,
.port_vlan_filtering = qca8k_port_vlan_filtering,
.port_vlan_add = qca8k_port_vlan_add,
.port_vlan_del = qca8k_port_vlan_del,
---
-cgit 1.2.3-1.el7
-
drivers/net/dsa/qca8k.h | 4 +++
2 files changed, 99 insertions(+)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 67742fbd80409..bd9d756f40011 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -2022,6 +2022,99 @@ qca8k_port_mdb_del(struct dsa_switch *ds, int port,
- return qca8k_fdb_search_and_del(priv, BIT(port), addr, vid);
+@@ -2027,6 +2027,99 @@ qca8k_port_mdb_del(struct dsa_switch *ds
}
-+static int
+ static int
+qca8k_port_mirror_add(struct dsa_switch *ds, int port,
+ struct dsa_mall_mirror_tc_entry *mirror,
+ bool ingress)
+ dev_err(priv->dev, "Failed to del mirror port from %d", port);
+}
+
- static int
++static int
qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
struct netlink_ext_ack *extack)
-@@ -2132,6 +2225,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+ {
+@@ -2136,6 +2229,8 @@ static const struct dsa_switch_ops qca8k
.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_add = qca8k_port_vlan_add,
.port_vlan_del = qca8k_port_vlan_del,
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index 40ec8012622f7..7c87a968c0104 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -180,6 +180,7 @@
bool legacy_phy_port_mapping;
struct qca8k_ports_config ports_config;
struct regmap *regmap;
---
-cgit 1.2.3-1.el7
-
drivers/net/dsa/qca8k.h | 33 +++++++++
2 files changed, 210 insertions(+)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index bd9d756f40011..6516df08a5d5f 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -1336,6 +1336,9 @@ qca8k_setup(struct dsa_switch *ds)
+@@ -1340,6 +1340,9 @@ qca8k_setup(struct dsa_switch *ds)
ds->ageing_time_min = 7000;
ds->ageing_time_max = 458745000;
return 0;
}
-@@ -2203,6 +2206,178 @@ qca8k_get_tag_protocol(struct dsa_switch *ds, int port,
+@@ -2207,6 +2210,178 @@ qca8k_get_tag_protocol(struct dsa_switch
return DSA_TAG_PROTO_QCA;
}
static const struct dsa_switch_ops qca8k_switch_ops = {
.get_tag_protocol = qca8k_get_tag_protocol,
.setup = qca8k_setup,
-@@ -2236,6 +2411,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+@@ -2240,6 +2415,8 @@ static const struct dsa_switch_ops qca8k
.phylink_mac_link_down = qca8k_phylink_mac_link_down,
.phylink_mac_link_up = qca8k_phylink_mac_link_up,
.get_phy_flags = qca8k_get_phy_flags,
};
static int qca8k_read_switch_id(struct qca8k_priv *priv)
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index 7c87a968c0104..ab4a417b25a9c 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -15,6 +15,8 @@
bool legacy_phy_port_mapping;
struct qca8k_ports_config ports_config;
struct regmap *regmap;
---
-cgit 1.2.3-1.el7
-
drivers/net/dsa/qca8k.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 6516df08a5d5f..d04b25eca2503 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -2228,7 +2228,7 @@ qca8k_lag_can_offload(struct dsa_switch *ds,
+@@ -2232,7 +2232,7 @@ qca8k_lag_can_offload(struct dsa_switch
if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH)
return false;
info->hash_type != NETDEV_LAG_HASH_L23)
return false;
-@@ -2242,8 +2242,8 @@ qca8k_lag_setup_hash(struct dsa_switch *ds,
+@@ -2246,8 +2246,8 @@ qca8k_lag_setup_hash(struct dsa_switch *
{
struct qca8k_priv *priv = ds->priv;
bool unique_lag = true;
id = dsa_lag_id(ds->dst, lag);
---
-cgit 1.2.3-1.el7
-
net/dsa/slave.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
-diff --git a/net/dsa/slave.c b/net/dsa/slave.c
-index 88f7b8686dac..88bcdba92fa7 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
-@@ -2011,13 +2011,6 @@ int dsa_slave_create(struct dsa_port *port)
+@@ -1986,13 +1986,6 @@ int dsa_slave_create(struct dsa_port *po
port->slave = slave_dev;
dsa_slave_setup_tagger(slave_dev);
netif_carrier_off(slave_dev);
ret = dsa_slave_phy_setup(slave_dev);
-@@ -2028,6 +2021,13 @@ int dsa_slave_create(struct dsa_port *port)
- goto out_gcells;
+@@ -2004,6 +1997,13 @@ int dsa_slave_create(struct dsa_port *po
}
-+ rtnl_lock();
+ rtnl_lock();
+ ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
+ rtnl_unlock();
+ if (ret && ret != -EOPNOTSUPP)
+ dev_warn(ds->dev, "nonfatal error %d setting MTU to %d on port %d\n",
+ ret, ETH_DATA_LEN, port->index);
+
- rtnl_lock();
++ rtnl_lock();
ret = register_netdevice(slave_dev);
---
-2.34.1
-
+ if (ret) {
net/dsa/slave.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
-diff --git a/net/dsa/slave.c b/net/dsa/slave.c
-index 88bcdba92fa7..22241afcac81 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
-@@ -2022,14 +2022,12 @@ int dsa_slave_create(struct dsa_port *port)
+@@ -1997,14 +1997,12 @@ int dsa_slave_create(struct dsa_port *po
}
rtnl_lock();
ret = register_netdevice(slave_dev);
if (ret) {
netdev_err(master, "error %d registering interface %s\n",
---
-2.34.1
-
net/dsa/master.c | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
-diff --git a/net/dsa/master.c b/net/dsa/master.c
-index e8e19857621b..f4efb244f91d 100644
--- a/net/dsa/master.c
+++ b/net/dsa/master.c
-@@ -330,28 +330,13 @@ static const struct attribute_group dsa_group = {
+@@ -330,28 +330,13 @@ static const struct attribute_group dsa_
.attrs = dsa_slave_attrs,
};
/* The DSA master must use SET_NETDEV_DEV for this to work. */
consumer_link = device_link_add(ds->dev, dev->dev.parent,
-@@ -361,13 +346,6 @@ int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp)
+@@ -361,13 +346,6 @@ int dsa_master_setup(struct net_device *
"Failed to create a device link to DSA switch %s\n",
dev_name(ds->dev));
/* If we use a tagging format that doesn't have an ethertype
* field, make sure that all packets from this point on get
* sent to the tag format's receive function.
-@@ -405,7 +383,6 @@ void dsa_master_teardown(struct net_device *dev)
+@@ -405,7 +383,6 @@ void dsa_master_teardown(struct net_devi
sysfs_remove_group(&dev->dev.kobj, &dsa_group);
dsa_netdev_ops_set(dev, NULL);
dsa_master_ethtool_teardown(dev);
dsa_master_set_promiscuity(dev, -1);
dev->dsa_ptr = NULL;
---
-2.34.1
-
net/dsa/master.c | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index a0d84f9f864f..52fb1958b535 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -1038,6 +1038,8 @@ static int dsa_tree_setup_master(struct dsa_switch_tree *dst)
+@@ -1034,6 +1034,8 @@ static int dsa_tree_setup_master(struct
struct dsa_port *dp;
int err;
list_for_each_entry(dp, &dst->ports, list) {
if (dsa_port_is_cpu(dp)) {
err = dsa_master_setup(dp->master, dp);
-@@ -1046,6 +1048,8 @@ static int dsa_tree_setup_master(struct dsa_switch_tree *dst)
+@@ -1042,6 +1044,8 @@ static int dsa_tree_setup_master(struct
}
}
return 0;
}
-@@ -1053,9 +1057,13 @@ static void dsa_tree_teardown_master(struct dsa_switch_tree *dst)
+@@ -1049,9 +1053,13 @@ static void dsa_tree_teardown_master(str
{
struct dsa_port *dp;
}
static int dsa_tree_setup_lags(struct dsa_switch_tree *dst)
-diff --git a/net/dsa/master.c b/net/dsa/master.c
-index f4efb244f91d..2199104ca7df 100644
--- a/net/dsa/master.c
+++ b/net/dsa/master.c
-@@ -267,9 +267,9 @@ static void dsa_master_set_promiscuity(struct net_device *dev, int inc)
+@@ -267,9 +267,9 @@ static void dsa_master_set_promiscuity(s
if (!ops->promisc_on_master)
return;
}
static ssize_t tagging_show(struct device *d, struct device_attribute *attr,
---
-2.34.1
-
net/dsa/dsa2.c | 50 +++++++++++++++++++++++++++++++++++++-------------
1 file changed, 37 insertions(+), 13 deletions(-)
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index 52fb1958b535..ea0f02a24b8b 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -1003,23 +1003,28 @@ static void dsa_tree_teardown_switches(struct dsa_switch_tree *dst)
+@@ -999,23 +999,28 @@ static void dsa_tree_teardown_switches(s
dsa_switch_teardown(dp->ds);
}
}
}
-@@ -1028,7 +1033,21 @@ static int dsa_tree_setup_switches(struct dsa_switch_tree *dst)
+@@ -1024,7 +1029,21 @@ static int dsa_tree_setup_switches(struc
teardown:
dsa_tree_teardown_ports(dst);
return err;
}
-@@ -1115,10 +1134,14 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
+@@ -1111,10 +1130,14 @@ static int dsa_tree_setup(struct dsa_swi
if (err)
goto teardown_cpu_ports;
err = dsa_tree_setup_lags(dst);
if (err)
goto teardown_master;
-@@ -1131,8 +1154,9 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
+@@ -1127,8 +1150,9 @@ static int dsa_tree_setup(struct dsa_swi
teardown_master:
dsa_tree_teardown_master(dst);
dsa_tree_teardown_switches(dst);
teardown_cpu_ports:
dsa_tree_teardown_cpu_ports(dst);
---
-2.34.1
-
net/dsa/dsa2.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index ea0f02a24b8b..3d21521453fe 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -561,6 +561,7 @@ static void dsa_port_teardown(struct dsa_port *dp)
+@@ -545,6 +545,7 @@ static void dsa_port_teardown(struct dsa
struct devlink_port *dlp = &dp->devlink_port;
struct dsa_switch *ds = dp->ds;
struct dsa_mac_addr *a, *tmp;
if (!dp->setup)
return;
-@@ -582,9 +583,11 @@ static void dsa_port_teardown(struct dsa_port *dp)
+@@ -566,9 +567,11 @@ static void dsa_port_teardown(struct dsa
dsa_port_link_unregister_of(dp);
break;
case DSA_PORT_TYPE_USER:
}
break;
}
-@@ -1134,17 +1137,17 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
+@@ -1130,17 +1133,17 @@ static int dsa_tree_setup(struct dsa_swi
if (err)
goto teardown_cpu_ports;
dst->setup = true;
-@@ -1152,10 +1155,10 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
+@@ -1148,10 +1151,10 @@ static int dsa_tree_setup(struct dsa_swi
return 0;
teardown_switches:
dsa_tree_teardown_switches(dst);
teardown_cpu_ports:
-@@ -1173,10 +1176,10 @@ static void dsa_tree_teardown(struct dsa_switch_tree *dst)
+@@ -1169,10 +1172,10 @@ static void dsa_tree_teardown(struct dsa
dsa_tree_teardown_lags(dst);
dsa_tree_teardown_switches(dst);
dsa_tree_teardown_cpu_ports(dst);
---
-2.34.1
-
net/dsa/switch.c | 15 +++++++++++++++
5 files changed, 123 insertions(+)
-diff --git a/include/net/dsa.h b/include/net/dsa.h
-index 57b3e4e7413b..43c4153ef53a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
-@@ -278,6 +278,10 @@ struct dsa_port {
+@@ -291,6 +291,10 @@ struct dsa_port {
struct list_head mdbs;
bool setup;
};
/* TODO: ideally DSA ports would have a single dp->link_dp member,
-@@ -478,6 +482,12 @@ static inline bool dsa_port_is_unused(struct dsa_port *dp)
+@@ -456,6 +460,12 @@ static inline bool dsa_port_is_unused(st
return dp->type == DSA_PORT_TYPE_UNUSED;
}
static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p)
{
return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED;
-@@ -1036,6 +1046,13 @@ struct dsa_switch_ops {
+@@ -916,6 +926,13 @@ struct dsa_switch_ops {
int (*tag_8021q_vlan_add)(struct dsa_switch *ds, int port, u16 vid,
u16 flags);
int (*tag_8021q_vlan_del)(struct dsa_switch *ds, int port, u16 vid);
};
#define DSA_DEVLINK_PARAM_DRIVER(_id, _name, _type, _cmodes) \
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index 3d21521453fe..ff998c0ede02 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -1279,6 +1279,52 @@ int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst,
+@@ -1275,6 +1275,52 @@ out_unlock:
return err;
}
static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index)
{
struct dsa_switch_tree *dst = ds->dst;
-diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
-index 760306f0012f..2bbfa9efe9f8 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
-@@ -40,6 +40,7 @@ enum {
- DSA_NOTIFIER_TAG_PROTO_DISCONNECT,
+@@ -45,6 +45,7 @@ enum {
+ DSA_NOTIFIER_MRP_DEL_RING_ROLE,
DSA_NOTIFIER_TAG_8021Q_VLAN_ADD,
DSA_NOTIFIER_TAG_8021Q_VLAN_DEL,
+ DSA_NOTIFIER_MASTER_STATE_CHANGE,
};
/* DSA_NOTIFIER_AGEING_TIME */
-@@ -109,6 +110,12 @@ struct dsa_notifier_tag_8021q_vlan_info {
+@@ -127,6 +128,12 @@ struct dsa_notifier_tag_8021q_vlan_info
u16 vid;
};
struct dsa_switchdev_event_work {
struct dsa_switch *ds;
int port;
-@@ -482,6 +489,12 @@ int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst,
+@@ -548,6 +555,12 @@ int dsa_tree_change_tag_proto(struct dsa
struct net_device *master,
const struct dsa_device_ops *tag_ops,
const struct dsa_device_ops *old_tag_ops);
int dsa_bridge_num_get(const struct net_device *bridge_dev, int max);
void dsa_bridge_num_put(const struct net_device *bridge_dev, int bridge_num);
-diff --git a/net/dsa/slave.c b/net/dsa/slave.c
-index 22241afcac81..2b5b0f294233 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
-@@ -2346,6 +2346,36 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
+@@ -2320,6 +2320,36 @@ static int dsa_slave_netdevice_event(str
err = dsa_port_lag_change(dp, info->lower_state_info);
return notifier_from_errno(err);
}
case NETDEV_GOING_DOWN: {
struct dsa_port *dp, *cpu_dp;
struct dsa_switch_tree *dst;
-@@ -2357,6 +2387,8 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
+@@ -2331,6 +2361,8 @@ static int dsa_slave_netdevice_event(str
cpu_dp = dev->dsa_ptr;
dst = cpu_dp->ds->dst;
+ dsa_tree_master_admin_state_change(dst, dev, false);
+
list_for_each_entry(dp, &dst->ports, list) {
- if (!dsa_port_is_user(dp))
+ if (!dsa_is_user_port(dp->ds, dp->index))
continue;
-diff --git a/net/dsa/switch.c b/net/dsa/switch.c
-index 517cc83d13cc..4866b58649e4 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
-@@ -697,6 +697,18 @@ dsa_switch_disconnect_tag_proto(struct dsa_switch *ds,
+@@ -722,6 +722,18 @@ dsa_switch_mrp_del_ring_role(struct dsa_
return 0;
}
static int dsa_switch_event(struct notifier_block *nb,
unsigned long event, void *info)
{
-@@ -770,6 +782,9 @@ static int dsa_switch_event(struct notifier_block *nb,
+@@ -813,6 +825,9 @@ static int dsa_switch_event(struct notif
case DSA_NOTIFIER_TAG_8021Q_VLAN_DEL:
err = dsa_switch_tag_8021q_vlan_del(ds, info);
break;
default:
err = -EOPNOTSUPP;
break;
---
-2.34.1
-
net/dsa/dsa2.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index ff998c0ede02..909b045c9b11 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -15,6 +15,7 @@
#include "dsa_priv.h"
-@@ -1064,9 +1065,18 @@ static int dsa_tree_setup_master(struct dsa_switch_tree *dst)
+@@ -1060,9 +1061,18 @@ static int dsa_tree_setup_master(struct
list_for_each_entry(dp, &dst->ports, list) {
if (dsa_port_is_cpu(dp)) {
}
}
-@@ -1081,9 +1091,19 @@ static void dsa_tree_teardown_master(struct dsa_switch_tree *dst)
+@@ -1077,9 +1087,19 @@ static void dsa_tree_teardown_master(str
rtnl_lock();
rtnl_unlock();
}
---
-2.34.1
-
net/dsa/tag_qca.c | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index 1ea9401b8ace..55fa6b96b4eb 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -4,29 +4,24 @@
+#define QCA_HDR_RECV_TYPE GENMASK(10, 6)
#define QCA_HDR_RECV_FRAME_IS_TAGGED BIT(3)
-#define QCA_HDR_RECV_SOURCE_PORT_MASK GENMASK(2, 0)
--
++#define QCA_HDR_RECV_SOURCE_PORT GENMASK(2, 0)
+
-#define QCA_HDR_XMIT_VERSION_MASK GENMASK(15, 14)
-#define QCA_HDR_XMIT_VERSION_S 14
-#define QCA_HDR_XMIT_PRIORITY_MASK GENMASK(13, 11)
-#define QCA_HDR_XMIT_PRIORITY_S 11
-#define QCA_HDR_XMIT_CONTROL_MASK GENMASK(10, 8)
-#define QCA_HDR_XMIT_CONTROL_S 8
-+#define QCA_HDR_RECV_SOURCE_PORT GENMASK(2, 0)
-+
+#define QCA_HDR_XMIT_VERSION GENMASK(15, 14)
+#define QCA_HDR_XMIT_PRIORITY GENMASK(13, 11)
+#define QCA_HDR_XMIT_CONTROL GENMASK(10, 8)
static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
{
-@@ -40,8 +35,9 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -40,8 +35,9 @@ static struct sk_buff *qca_tag_xmit(stru
phdr = dsa_etype_header_pos_tx(skb);
/* Set the version field, and set destination port information */
*phdr = htons(hdr);
-@@ -62,7 +58,7 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -62,7 +58,7 @@ static struct sk_buff *qca_tag_rcv(struc
hdr = ntohs(*phdr);
/* Make sure the version is correct */
if (unlikely(ver != QCA_HDR_VERSION))
return NULL;
-@@ -71,7 +67,7 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -71,7 +67,7 @@ static struct sk_buff *qca_tag_rcv(struc
dsa_strip_etype_header(skb, QCA_HDR_LEN);
/* Get source port information */
skb->dev = dsa_master_find_slave(dev, 0, port);
if (!skb->dev)
---
-2.34.1
-
2 files changed, 22 insertions(+), 15 deletions(-)
create mode 100644 include/linux/dsa/tag_qca.h
-diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h
-new file mode 100644
-index 000000000000..c02d2d39ff4a
--- /dev/null
+++ b/include/linux/dsa/tag_qca.h
@@ -0,0 +1,21 @@
+#define QCA_HDR_XMIT_DP_BIT GENMASK(6, 0)
+
+#endif /* __TAG_QCA_H */
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index 55fa6b96b4eb..34e565e00ece 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -5,24 +5,10 @@
static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_port *dp = dsa_slave_to_port(dev);
---
-2.34.1
-
net/dsa/tag_qca.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index 34e565e00ece..f8df49d5956f 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
-@@ -68,6 +68,7 @@ static const struct dsa_device_ops qca_netdev_ops = {
+@@ -68,6 +68,7 @@ static const struct dsa_device_ops qca_n
.xmit = qca_tag_xmit,
.rcv = qca_tag_rcv,
.needed_headroom = QCA_HDR_LEN,
};
MODULE_LICENSE("GPL");
---
-2.34.1
-
net/dsa/tag_qca.c | 15 ++++++++++---
2 files changed, 56 insertions(+), 3 deletions(-)
-diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h
-index c02d2d39ff4a..f366422ab7a0 100644
--- a/include/linux/dsa/tag_qca.h
+++ b/include/linux/dsa/tag_qca.h
@@ -12,10 +12,54 @@
+} __packed;
+
#endif /* __TAG_QCA_H */
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index f8df49d5956f..f17ed5be20c2 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
-@@ -32,10 +32,12 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -32,10 +32,12 @@ static struct sk_buff *qca_tag_xmit(stru
static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{
if (unlikely(!pskb_may_pull(skb, QCA_HDR_LEN)))
return NULL;
-@@ -48,6 +50,13 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -48,6 +50,13 @@ static struct sk_buff *qca_tag_rcv(struc
if (unlikely(ver != QCA_HDR_VERSION))
return NULL;
/* Remove QCA tag and recalculate checksum */
skb_pull_rcsum(skb, QCA_HDR_LEN);
dsa_strip_etype_header(skb, QCA_HDR_LEN);
---
-2.34.1
-
net/dsa/tag_qca.c | 4 ++++
2 files changed, 14 insertions(+)
-diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h
-index f366422ab7a0..1fff57f2937b 100644
--- a/include/linux/dsa/tag_qca.h
+++ b/include/linux/dsa/tag_qca.h
@@ -62,4 +62,14 @@ struct qca_mgmt_ethhdr {
+} __packed;
+
#endif /* __TAG_QCA_H */
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index f17ed5be20c2..be792cf687d9 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
-@@ -57,6 +57,10 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -57,6 +57,10 @@ static struct sk_buff *qca_tag_rcv(struc
if (pk_type == QCA_HDR_RECV_TYPE_RW_REG_ACK)
return NULL;
/* Remove QCA tag and recalculate checksum */
skb_pull_rcsum(skb, QCA_HDR_LEN);
dsa_strip_etype_header(skb, QCA_HDR_LEN);
---
-2.34.1
-
net/dsa/tag_qca.c | 39 ++++++++++++++++++++++++++++++++++---
2 files changed, 43 insertions(+), 3 deletions(-)
-diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h
-index 1fff57f2937b..4359fb0221cf 100644
--- a/include/linux/dsa/tag_qca.h
+++ b/include/linux/dsa/tag_qca.h
@@ -72,4 +72,11 @@ struct mib_ethhdr {
+};
+
#endif /* __TAG_QCA_H */
-diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
-index be792cf687d9..57d2e00f1e5d 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -5,6 +5,7 @@
#include <linux/dsa/tag_qca.h>
#include "dsa_priv.h"
-@@ -32,6 +33,9 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
+@@ -32,6 +33,9 @@ static struct sk_buff *qca_tag_xmit(stru
static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{
u8 ver, pk_type;
__be16 *phdr;
int port;
-@@ -39,6 +43,8 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -39,6 +43,8 @@ static struct sk_buff *qca_tag_rcv(struc
BUILD_BUG_ON(sizeof(struct qca_mgmt_ethhdr) != QCA_HDR_MGMT_HEADER_LEN + QCA_HDR_LEN);
if (unlikely(!pskb_may_pull(skb, QCA_HDR_LEN)))
return NULL;
-@@ -53,13 +59,19 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -53,13 +59,19 @@ static struct sk_buff *qca_tag_rcv(struc
/* Get pk type */
pk_type = FIELD_GET(QCA_HDR_RECV_TYPE, hdr);
/* Remove QCA tag and recalculate checksum */
skb_pull_rcsum(skb, QCA_HDR_LEN);
-@@ -75,9 +87,30 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
+@@ -75,9 +87,30 @@ static struct sk_buff *qca_tag_rcv(struc
return skb;
}
.xmit = qca_tag_xmit,
.rcv = qca_tag_rcv,
.needed_headroom = QCA_HDR_LEN,
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 1 +
2 files changed, 16 insertions(+)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 039694518788..ec062b9a918d 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -2383,6 +2383,20 @@ qca8k_port_lag_leave(struct dsa_switch *ds, int port,
+@@ -2382,6 +2382,20 @@ qca8k_port_lag_leave(struct dsa_switch *
return qca8k_lag_refresh_portmap(ds, port, lag, true);
}
static const struct dsa_switch_ops qca8k_switch_ops = {
.get_tag_protocol = qca8k_get_tag_protocol,
.setup = qca8k_setup,
-@@ -2418,6 +2432,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+@@ -2417,6 +2431,7 @@ static const struct dsa_switch_ops qca8k
.get_phy_flags = qca8k_get_phy_flags,
.port_lag_join = qca8k_port_lag_join,
.port_lag_leave = qca8k_port_lag_leave,
};
static int qca8k_read_switch_id(struct qca8k_priv *priv)
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index ab4a417b25a9..b81aad98a116 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -353,6 +353,7 @@ struct qca8k_priv {
};
struct qca8k_mib_desc {
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 13 +++
2 files changed, 238 insertions(+)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index ec062b9a918d..e3a215f04559 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -20,6 +20,7 @@
#include "qca8k.h"
-@@ -170,6 +171,194 @@ qca8k_rmw(struct qca8k_priv *priv, u32 reg, u32 mask, u32 write_val)
+@@ -170,6 +171,194 @@ qca8k_rmw(struct qca8k_priv *priv, u32 r
return regmap_update_bits(priv->regmap, reg, mask, write_val);
}
static int
qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
{
-@@ -178,6 +367,9 @@ qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
+@@ -178,6 +367,9 @@ qca8k_regmap_read(void *ctx, uint32_t re
u16 r1, r2, page;
int ret;
qca8k_split_addr(reg, &r1, &r2, &page);
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
-@@ -201,6 +393,9 @@ qca8k_regmap_write(void *ctx, uint32_t reg, uint32_t val)
+@@ -201,6 +393,9 @@ qca8k_regmap_write(void *ctx, uint32_t r
u16 r1, r2, page;
int ret;
qca8k_split_addr(reg, &r1, &r2, &page);
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
-@@ -225,6 +420,9 @@ qca8k_regmap_update_bits(void *ctx, uint32_t reg, uint32_t mask, uint32_t write_
+@@ -225,6 +420,9 @@ qca8k_regmap_update_bits(void *ctx, uint
u32 val;
int ret;
qca8k_split_addr(reg, &r1, &r2, &page);
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
-@@ -2394,7 +2592,30 @@ qca8k_master_change(struct dsa_switch *ds, const struct net_device *master,
+@@ -2393,7 +2591,30 @@ qca8k_master_change(struct dsa_switch *d
if (dp->index != 0)
return;
}
static const struct dsa_switch_ops qca8k_switch_ops = {
-@@ -2433,6 +2654,7 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
+@@ -2432,6 +2653,7 @@ static const struct dsa_switch_ops qca8k
.port_lag_join = qca8k_port_lag_join,
.port_lag_leave = qca8k_port_lag_leave,
.master_state_change = qca8k_master_change,
};
static int qca8k_read_switch_id(struct qca8k_priv *priv)
-@@ -2512,6 +2734,9 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
+@@ -2511,6 +2733,9 @@ qca8k_sw_probe(struct mdio_device *mdiod
if (!priv->ds)
return -ENOMEM;
priv->ds->dev = &mdiodev->dev;
priv->ds->num_ports = QCA8K_NUM_PORTS;
priv->ds->priv = priv;
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index b81aad98a116..75c28689a652 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -11,6 +11,10 @@
};
struct qca8k_mib_desc {
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 17 ++++++-
2 files changed, 121 insertions(+), 2 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index e3a215f04559..199cf4f761c0 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -830,7 +830,10 @@ qca8k_mib_init(struct qca8k_priv *priv)
if (ret)
goto exit;
-@@ -1901,6 +1904,97 @@ qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data)
+@@ -1901,6 +1904,97 @@ qca8k_get_strings(struct dsa_switch *ds,
ETH_GSTRING_LEN);
}
static void
qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
uint64_t *data)
-@@ -1912,6 +2006,10 @@ qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
+@@ -1912,6 +2006,10 @@ qca8k_get_ethtool_stats(struct dsa_switc
u32 hi = 0;
int ret;
match_data = of_device_get_match_data(priv->dev);
for (i = 0; i < match_data->mib_count; i++) {
-@@ -2593,9 +2691,11 @@ qca8k_master_change(struct dsa_switch *ds, const struct net_device *master,
+@@ -2592,9 +2690,11 @@ qca8k_master_change(struct dsa_switch *d
return;
mutex_lock(&priv->mgmt_eth_data.mutex);
mutex_unlock(&priv->mgmt_eth_data.mutex);
}
-@@ -2609,6 +2709,7 @@ static int qca8k_connect_tag_protocol(struct dsa_switch *ds,
+@@ -2608,6 +2708,7 @@ static int qca8k_connect_tag_protocol(st
tagger_data = ds->tagger_data;
tagger_data->rw_reg_ack_handler = qca8k_rw_reg_ack_handler;
break;
default:
-@@ -2737,6 +2838,9 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
+@@ -2736,6 +2837,9 @@ qca8k_sw_probe(struct mdio_device *mdiod
mutex_init(&priv->mgmt_eth_data.mutex);
init_completion(&priv->mgmt_eth_data.rw_done);
priv->ds->dev = &mdiodev->dev;
priv->ds->num_ports = QCA8K_NUM_PORTS;
priv->ds->priv = priv;
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index 75c28689a652..2d7d084db089 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -67,7 +67,7 @@
};
struct qca8k_mib_desc {
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 1 +
2 files changed, 217 insertions(+)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 199cf4f761c0..0ce5b7ca0b7f 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -867,6 +867,199 @@ qca8k_port_set_status(struct qca8k_priv *priv, int port, int enable)
+@@ -867,6 +867,199 @@ qca8k_port_set_status(struct qca8k_priv
regmap_clear_bits(priv->regmap, QCA8K_REG_PORT_STATUS(port), mask);
}
static u32
qca8k_port_to_phy(int port)
{
-@@ -989,6 +1182,12 @@ qca8k_internal_mdio_write(struct mii_bus *slave_bus, int phy, int regnum, u16 da
+@@ -989,6 +1182,12 @@ qca8k_internal_mdio_write(struct mii_bus
{
struct qca8k_priv *priv = slave_bus->priv;
struct mii_bus *bus = priv->bus;
return qca8k_mdio_write(bus, phy, regnum, data);
}
-@@ -998,6 +1197,12 @@ qca8k_internal_mdio_read(struct mii_bus *slave_bus, int phy, int regnum)
+@@ -998,6 +1197,12 @@ qca8k_internal_mdio_read(struct mii_bus
{
struct qca8k_priv *priv = slave_bus->priv;
struct mii_bus *bus = priv->bus;
/* Check if the legacy mapping should be used and the
* port is not correctly mapped to the right PHY in the
-@@ -1014,6 +1220,11 @@ qca8k_phy_write(struct dsa_switch *ds, int port, int regnum, u16 data)
+@@ -1014,6 +1220,11 @@ qca8k_phy_write(struct dsa_switch *ds, i
if (priv->legacy_phy_port_mapping)
port = qca8k_port_to_phy(port) % PHY_MAX_ADDR;
return qca8k_mdio_write(priv->bus, port, regnum, data);
}
-@@ -1030,6 +1241,11 @@ qca8k_phy_read(struct dsa_switch *ds, int port, int regnum)
+@@ -1030,6 +1241,11 @@ qca8k_phy_read(struct dsa_switch *ds, in
if (priv->legacy_phy_port_mapping)
port = qca8k_port_to_phy(port) % PHY_MAX_ADDR;
ret = qca8k_mdio_read(priv->bus, port, regnum);
if (ret < 0)
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index 2d7d084db089..c6f6abd2108e 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -14,6 +14,7 @@
#define QCA8K_ETHERNET_TIMEOUT 100
#define QCA8K_NUM_PORTS 7
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 9 +++++++++
2 files changed, 29 insertions(+), 22 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 0ce5b7ca0b7f..86d3742b1038 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -75,12 +75,6 @@ static const struct qca8k_mib_desc ar8327_mib[] = {
+@@ -75,12 +75,6 @@ static const struct qca8k_mib_desc ar832
MIB_DESC(1, 0xac, "TXUnicast"),
};
static void
qca8k_split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page)
{
-@@ -134,11 +128,13 @@ qca8k_mii_write32(struct mii_bus *bus, int phy_id, u32 regnum, u32 val)
+@@ -134,11 +128,13 @@ qca8k_mii_write32(struct mii_bus *bus, i
}
static int
return 0;
ret = bus->write(bus, 0x18, 0, page);
-@@ -148,7 +144,7 @@ qca8k_set_page(struct mii_bus *bus, u16 page)
+@@ -148,7 +144,7 @@ qca8k_set_page(struct mii_bus *bus, u16
return ret;
}
usleep_range(1000, 2000);
return 0;
}
-@@ -374,7 +370,7 @@ qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
+@@ -374,7 +370,7 @@ qca8k_regmap_read(void *ctx, uint32_t re
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
if (ret < 0)
goto exit;
-@@ -400,7 +396,7 @@ qca8k_regmap_write(void *ctx, uint32_t reg, uint32_t val)
+@@ -400,7 +396,7 @@ qca8k_regmap_write(void *ctx, uint32_t r
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
if (ret < 0)
goto exit;
-@@ -427,7 +423,7 @@ qca8k_regmap_update_bits(void *ctx, uint32_t reg, uint32_t mask, uint32_t write_
+@@ -427,7 +423,7 @@ qca8k_regmap_update_bits(void *ctx, uint
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
if (ret < 0)
goto exit;
-@@ -1098,8 +1094,9 @@ qca8k_mdio_busy_wait(struct mii_bus *bus, u32 reg, u32 mask)
+@@ -1098,8 +1094,9 @@ qca8k_mdio_busy_wait(struct mii_bus *bus
}
static int
u16 r1, r2, page;
u32 val;
int ret;
-@@ -1116,7 +1113,7 @@ qca8k_mdio_write(struct mii_bus *bus, int phy, int regnum, u16 data)
+@@ -1116,7 +1113,7 @@ qca8k_mdio_write(struct mii_bus *bus, in
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
if (ret)
goto exit;
-@@ -1135,8 +1132,9 @@ qca8k_mdio_write(struct mii_bus *bus, int phy, int regnum, u16 data)
+@@ -1135,8 +1132,9 @@ exit:
}
static int
u16 r1, r2, page;
u32 val;
int ret;
-@@ -1152,7 +1150,7 @@ qca8k_mdio_read(struct mii_bus *bus, int phy, int regnum)
+@@ -1152,7 +1150,7 @@ qca8k_mdio_read(struct mii_bus *bus, int
mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
int ret;
/* Use mdio Ethernet when available, fallback to legacy one on error */
-@@ -1189,14 +1186,13 @@ qca8k_internal_mdio_write(struct mii_bus *slave_bus, int phy, int regnum, u16 da
+@@ -1189,14 +1186,13 @@ qca8k_internal_mdio_write(struct mii_bus
if (!ret)
return 0;
int ret;
/* Use mdio Ethernet when available, fallback to legacy one on error */
-@@ -1204,7 +1200,7 @@ qca8k_internal_mdio_read(struct mii_bus *slave_bus, int phy, int regnum)
+@@ -1204,7 +1200,7 @@ qca8k_internal_mdio_read(struct mii_bus
if (ret >= 0)
return ret;
}
static int
-@@ -1225,7 +1221,7 @@ qca8k_phy_write(struct dsa_switch *ds, int port, int regnum, u16 data)
+@@ -1225,7 +1221,7 @@ qca8k_phy_write(struct dsa_switch *ds, i
if (!ret)
return ret;
}
static int
-@@ -1246,7 +1242,7 @@ qca8k_phy_read(struct dsa_switch *ds, int port, int regnum)
+@@ -1246,7 +1242,7 @@ qca8k_phy_read(struct dsa_switch *ds, in
if (ret >= 0)
return ret;
if (ret < 0)
return 0xffff;
-@@ -3042,6 +3038,8 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
+@@ -3041,6 +3037,8 @@ qca8k_sw_probe(struct mdio_device *mdiod
return PTR_ERR(priv->regmap);
}
/* Check the detected switch id */
ret = qca8k_read_switch_id(priv);
if (ret)
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index c6f6abd2108e..57368acae41b 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -363,6 +363,14 @@ struct qca8k_ports_config {
};
struct qca8k_mib_desc {
---
-2.34.1
-
drivers/net/dsa/qca8k.h | 5 ++++
2 files changed, 54 insertions(+), 12 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 86d3742b1038..0cce3a6030af 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -88,6 +88,44 @@ qca8k_split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page)
- *page = regaddr & 0x3ff;
+@@ -89,6 +89,44 @@ qca8k_split_addr(u32 regaddr, u16 *r1, u
}
-+static int
+ static int
+qca8k_set_lo(struct qca8k_priv *priv, int phy_id, u32 regnum, u16 lo)
+{
+ u16 *cached_lo = &priv->mdio_cache.lo;
+ return 0;
+}
+
- static int
++static int
qca8k_mii_read32(struct mii_bus *bus, int phy_id, u32 regnum, u32 *val)
{
-@@ -111,7 +149,7 @@ qca8k_mii_read32(struct mii_bus *bus, int phy_id, u32 regnum, u32 *val)
+ int ret;
+@@ -111,7 +149,7 @@ qca8k_mii_read32(struct mii_bus *bus, in
}
static void
{
u16 lo, hi;
int ret;
-@@ -119,12 +157,9 @@ qca8k_mii_write32(struct mii_bus *bus, int phy_id, u32 regnum, u32 val)
+@@ -119,12 +157,9 @@ qca8k_mii_write32(struct mii_bus *bus, i
lo = val & 0xffff;
hi = (u16)(val >> 16);
}
static int
-@@ -400,7 +435,7 @@ qca8k_regmap_write(void *ctx, uint32_t reg, uint32_t val)
+@@ -400,7 +435,7 @@ qca8k_regmap_write(void *ctx, uint32_t r
if (ret < 0)
goto exit;
exit:
mutex_unlock(&bus->mdio_lock);
-@@ -433,7 +468,7 @@ qca8k_regmap_update_bits(void *ctx, uint32_t reg, uint32_t mask, uint32_t write_
+@@ -433,7 +468,7 @@ qca8k_regmap_update_bits(void *ctx, uint
val &= ~mask;
val |= write_val;
exit:
mutex_unlock(&bus->mdio_lock);
-@@ -1117,14 +1152,14 @@ qca8k_mdio_write(struct qca8k_priv *priv, int phy, int regnum, u16 data)
+@@ -1117,14 +1152,14 @@ qca8k_mdio_write(struct qca8k_priv *priv
if (ret)
goto exit;
mutex_unlock(&bus->mdio_lock);
-@@ -1154,7 +1189,7 @@ qca8k_mdio_read(struct qca8k_priv *priv, int phy, int regnum)
+@@ -1154,7 +1189,7 @@ qca8k_mdio_read(struct qca8k_priv *priv,
if (ret)
goto exit;
ret = qca8k_mdio_busy_wait(bus, QCA8K_MDIO_MASTER_CTRL,
QCA8K_MDIO_MASTER_BUSY);
-@@ -1165,7 +1200,7 @@ qca8k_mdio_read(struct qca8k_priv *priv, int phy, int regnum)
+@@ -1165,7 +1200,7 @@ qca8k_mdio_read(struct qca8k_priv *priv,
exit:
/* even if the busy_wait timeouts try to clear the MASTER_EN */
mutex_unlock(&bus->mdio_lock);
-@@ -3039,6 +3074,8 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
+@@ -3038,6 +3073,8 @@ qca8k_sw_probe(struct mdio_device *mdiod
}
priv->mdio_cache.page = 0xffff;
/* Check the detected switch id */
ret = qca8k_read_switch_id(priv);
-diff --git a/drivers/net/dsa/qca8k.h b/drivers/net/dsa/qca8k.h
-index 57368acae41b..c3d3c2269b1d 100644
--- a/drivers/net/dsa/qca8k.h
+++ b/drivers/net/dsa/qca8k.h
@@ -369,6 +369,11 @@ struct qca8k_mdio_cache {
};
struct qca8k_priv {
---
-2.34.1
-
drivers/net/dsa/qca8k.c | 61 +++++++++++++++++++++++++++--------------
1 file changed, 41 insertions(+), 20 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index 0cce3a6030af..a1b76dcd2eb6 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -222,7 +222,9 @@ static void qca8k_rw_reg_ack_handler(struct dsa_switch *ds, struct sk_buff *skb)
+@@ -222,7 +222,9 @@ static void qca8k_rw_reg_ack_handler(str
if (cmd == MDIO_READ) {
mgmt_eth_data->data[0] = mgmt_ethhdr->mdio_data;
if (len > QCA_HDR_MGMT_DATA1_LEN)
memcpy(mgmt_eth_data->data + 1, skb->data,
QCA_HDR_MGMT_DATA2_LEN);
-@@ -232,16 +234,30 @@ static void qca8k_rw_reg_ack_handler(struct dsa_switch *ds, struct sk_buff *skb)
+@@ -232,16 +234,30 @@ static void qca8k_rw_reg_ack_handler(str
}
static struct sk_buff *qca8k_alloc_mdio_header(enum mdio_cmd cmd, u32 reg, u32 *val,
skb_reset_mac_header(skb);
skb_set_network_header(skb, skb->len);
-@@ -254,7 +270,7 @@ static struct sk_buff *qca8k_alloc_mdio_header(enum mdio_cmd cmd, u32 reg, u32 *
+@@ -254,7 +270,7 @@ static struct sk_buff *qca8k_alloc_mdio_
hdr |= FIELD_PREP(QCA_HDR_XMIT_CONTROL, QCA_HDR_XMIT_TYPE_RW_REG);
mgmt_ethhdr->command = FIELD_PREP(QCA_HDR_MGMT_ADDR, reg);
mgmt_ethhdr->command |= FIELD_PREP(QCA_HDR_MGMT_CMD, cmd);
mgmt_ethhdr->command |= FIELD_PREP(QCA_HDR_MGMT_CHECK_CODE,
QCA_HDR_MGMT_CHECK_CODE_VAL);
-@@ -264,7 +280,9 @@ static struct sk_buff *qca8k_alloc_mdio_header(enum mdio_cmd cmd, u32 reg, u32 *
+@@ -264,7 +280,9 @@ static struct sk_buff *qca8k_alloc_mdio_
mgmt_ethhdr->hdr = htons(hdr);
return skb;
}
-@@ -277,7 +295,7 @@ static void qca8k_mdio_header_fill_seq_num(struct sk_buff *skb, u32 seq_num)
+@@ -277,7 +295,7 @@ static void qca8k_mdio_header_fill_seq_n
mgmt_ethhdr->seq = FIELD_PREP(QCA_HDR_MGMT_SEQ_NUM, seq_num);
}
{
struct qca8k_mgmt_eth_data *mgmt_eth_data = &priv->mgmt_eth_data;
struct sk_buff *skb;
-@@ -285,7 +303,7 @@ static int qca8k_read_eth(struct qca8k_priv *priv, u32 reg, u32 *val)
+@@ -285,7 +303,7 @@ static int qca8k_read_eth(struct qca8k_p
int ret;
skb = qca8k_alloc_mdio_header(MDIO_READ, reg, NULL,
if (!skb)
return -ENOMEM;
-@@ -313,6 +331,9 @@ static int qca8k_read_eth(struct qca8k_priv *priv, u32 reg, u32 *val)
+@@ -313,6 +331,9 @@ static int qca8k_read_eth(struct qca8k_p
msecs_to_jiffies(QCA8K_ETHERNET_TIMEOUT));
*val = mgmt_eth_data->data[0];
ack = mgmt_eth_data->ack;
mutex_unlock(&mgmt_eth_data->mutex);
-@@ -326,15 +347,15 @@ static int qca8k_read_eth(struct qca8k_priv *priv, u32 reg, u32 *val)
+@@ -326,15 +347,15 @@ static int qca8k_read_eth(struct qca8k_p
return 0;
}
if (!skb)
return -ENOMEM;
-@@ -380,14 +401,14 @@ qca8k_regmap_update_bits_eth(struct qca8k_priv *priv, u32 reg, u32 mask, u32 wri
+@@ -380,14 +401,14 @@ qca8k_regmap_update_bits_eth(struct qca8
u32 val = 0;
int ret;
}
static int
-@@ -398,7 +419,7 @@ qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
+@@ -398,7 +419,7 @@ qca8k_regmap_read(void *ctx, uint32_t re
u16 r1, r2, page;
int ret;
return 0;
qca8k_split_addr(reg, &r1, &r2, &page);
-@@ -424,7 +445,7 @@ qca8k_regmap_write(void *ctx, uint32_t reg, uint32_t val)
+@@ -424,7 +445,7 @@ qca8k_regmap_write(void *ctx, uint32_t r
u16 r1, r2, page;
int ret;
return 0;
qca8k_split_addr(reg, &r1, &r2, &page);
-@@ -959,21 +980,21 @@ qca8k_phy_eth_command(struct qca8k_priv *priv, bool read, int phy,
+@@ -959,21 +980,21 @@ qca8k_phy_eth_command(struct qca8k_priv
}
/* Prealloc all the needed skb before the lock */
ret = -ENOMEM;
goto err_read_skb;
}
---
-2.34.1
-
drivers/net/dsa/qca8k.c | 55 ++++++++++++++++++++++++++++++++---------
1 file changed, 43 insertions(+), 12 deletions(-)
-diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
-index a1b76dcd2eb6..52ec2800dd89 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
-@@ -411,6 +411,43 @@ qca8k_regmap_update_bits_eth(struct qca8k_priv *priv, u32 reg, u32 mask, u32 wri
- return qca8k_write_eth(priv, reg, &val, sizeof(val));
+@@ -412,6 +412,43 @@ qca8k_regmap_update_bits_eth(struct qca8
}
-+static int
+ static int
+qca8k_bulk_read(struct qca8k_priv *priv, u32 reg, u32 *val, int len)
+{
+ int i, count = len / sizeof(u32), ret;
+ return 0;
+}
+
- static int
++static int
qca8k_regmap_read(void *ctx, uint32_t reg, uint32_t *val)
{
-@@ -546,17 +583,13 @@ qca8k_busy_wait(struct qca8k_priv *priv, u32 reg, u32 mask)
+ struct qca8k_priv *priv = (struct qca8k_priv *)ctx;
+@@ -546,17 +583,13 @@ qca8k_busy_wait(struct qca8k_priv *priv,
static int
qca8k_fdb_read(struct qca8k_priv *priv, struct qca8k_fdb *fdb)
{
/* vid - 83:72 */
fdb->vid = FIELD_GET(QCA8K_ATU_VID_MASK, reg[2]);
-@@ -580,7 +613,6 @@ qca8k_fdb_write(struct qca8k_priv *priv, u16 vid, u8 port_mask, const u8 *mac,
+@@ -580,7 +613,6 @@ qca8k_fdb_write(struct qca8k_priv *priv,
u8 aging)
{
u32 reg[3] = { 0 };
/* vid - 83:72 */
reg[2] = FIELD_PREP(QCA8K_ATU_VID_MASK, vid);
-@@ -597,8 +629,7 @@ qca8k_fdb_write(struct qca8k_priv *priv, u16 vid, u8 port_mask, const u8 *mac,
+@@ -597,8 +629,7 @@ qca8k_fdb_write(struct qca8k_priv *priv,
reg[0] |= FIELD_PREP(QCA8K_ATU_ADDR5_MASK, mac[5]);
/* load the array into the ARL table */
}
static int
---
-2.34.1
-
net/dsa/switch.c | 38 +++++++++++++++++++++++++-------------
1 file changed, 25 insertions(+), 13 deletions(-)
-diff --git a/net/dsa/switch.c b/net/dsa/switch.c
-index e3c7d2627a619..9f9b70d6070a3 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
-@@ -113,25 +113,14 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds,
+@@ -113,25 +113,14 @@ static int dsa_switch_bridge_join(struct
return dsa_tag_8021q_bridge_join(ds, info);
}
if (ds->needs_standalone_vlan_filtering && !br_vlan_enabled(info->br)) {
change_vlan_filtering = true;
vlan_filtering = true;
-@@ -172,6 +161,29 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
+@@ -172,6 +161,29 @@ static int dsa_switch_bridge_leave(struc
return err;
}
return dsa_tag_8021q_bridge_leave(ds, info);
}
---
-cgit
net/dsa/switch.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
-diff --git a/net/dsa/switch.c b/net/dsa/switch.c
-index 9f9b70d6070a3..517cc83d13cc8 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
-@@ -180,9 +180,11 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
+@@ -180,9 +180,11 @@ static int dsa_switch_bridge_leave(struc
info->sw_index, info->port,
- info->bridge);
+ info->br);
- err = dsa_switch_sync_vlan_filtering(ds, info);
- if (err)
return dsa_tag_8021q_bridge_leave(ds, info);
}
---
-cgit
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -881,8 +881,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
+@@ -874,8 +874,13 @@ advk_pci_bridge_emul_pcie_conf_read(stru
case PCI_EXP_DEVCAP:
case PCI_EXP_DEVCTL:
default:
return PCI_BRIDGE_EMUL_NOT_HANDLED;
}
-@@ -896,10 +901,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -889,10 +894,6 @@ advk_pci_bridge_emul_pcie_conf_write(str
struct advk_pcie *pcie = bridge->data;
switch (reg) {
case PCI_EXP_LNKCTL:
advk_writel(pcie, new, PCIE_CORE_PCIEXP_CAP + reg);
if (new & PCI_EXP_LNKCTL_RL)
-@@ -921,6 +922,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
+@@ -914,6 +915,12 @@ advk_pci_bridge_emul_pcie_conf_write(str
advk_writel(pcie, new, PCIE_ISR0_REG);
break;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -114,6 +114,7 @@
+@@ -115,6 +115,7 @@
#define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54)
#define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58)
#define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C)
#define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C)
#define PCIE_MSI_DATA_MASK GENMASK(15, 0)
-@@ -577,6 +578,7 @@ static void advk_pcie_setup_hw(struct ad
+@@ -570,6 +571,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
/* Clear all interrupts */
advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_REG);
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG);
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
-@@ -589,7 +591,7 @@ static void advk_pcie_setup_hw(struct ad
+@@ -582,7 +584,7 @@ static void advk_pcie_setup_hw(struct ad
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
/* Unmask all MSIs */
/* Enable summary interrupt for GIC SPI source */
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
-@@ -1399,7 +1401,7 @@ static void advk_pcie_handle_msi(struct
+@@ -1392,7 +1394,7 @@ static void advk_pcie_handle_msi(struct
msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG);
msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1698,11 +1698,13 @@ static int advk_pcie_remove(struct platf
+@@ -1688,11 +1688,13 @@ static int advk_pcie_remove(struct platf
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1696,6 +1696,7 @@ static int advk_pcie_remove(struct platf
+@@ -1686,6 +1686,7 @@ static int advk_pcie_remove(struct platf
{
struct advk_pcie *pcie = platform_get_drvdata(pdev);
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie);
int i;
/* Remove PCI bus with all devices */
-@@ -1704,6 +1705,11 @@ static int advk_pcie_remove(struct platf
+@@ -1694,6 +1695,11 @@ static int advk_pcie_remove(struct platf
pci_remove_root_bus(bridge->bus);
pci_unlock_rescan_remove();
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1710,6 +1710,27 @@ static int advk_pcie_remove(struct platf
+@@ -1700,6 +1700,27 @@ static int advk_pcie_remove(struct platf
val &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
advk_writel(pcie, val, PCIE_CORE_CMD_STATUS_REG);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1735,6 +1735,9 @@ static int advk_pcie_remove(struct platf
+@@ -1725,6 +1725,9 @@ static int advk_pcie_remove(struct platf
advk_pcie_remove_msi_irq_domain(pcie);
advk_pcie_remove_irq_domain(pcie);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1738,6 +1738,10 @@ static int advk_pcie_remove(struct platf
+@@ -1728,6 +1728,10 @@ static int advk_pcie_remove(struct platf
/* Free config space for emulated root bridge */
pci_bridge_emul_cleanup(&pcie->bridge);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1742,6 +1742,11 @@ static int advk_pcie_remove(struct platf
+@@ -1732,6 +1732,11 @@ static int advk_pcie_remove(struct platf
if (pcie->reset_gpio)
gpiod_set_value_cansleep(pcie->reset_gpio, 1);
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1751,6 +1751,9 @@ static int advk_pcie_remove(struct platf
+@@ -1741,6 +1741,9 @@ static int advk_pcie_remove(struct platf
for (i = 0; i < OB_WIN_COUNT; i++)
advk_pcie_disable_ob_win(pcie, i);
static void ath79_halt(void)
{
while (1)
-@@ -233,7 +224,6 @@ void __init plat_mem_setup(void)
+@@ -234,7 +225,6 @@ void __init plat_mem_setup(void)
detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);