diff options
author | David S. Miller <davem@davemloft.net> | 2017-06-13 16:35:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-13 16:35:04 -0400 |
commit | b217566a525ff24334d17635a865f44b68c2c583 (patch) | |
tree | 1f4d13a47187b7662ea5369ffe163deee2c79550 /drivers | |
parent | 38b6ec5008bb7019a705b576df345509f39d3f4b (diff) | |
parent | 3cc9f2573cdcbc6991aa2d1c8e04a4b9190487f8 (diff) |
Merge branch 'net-dsa-Multi-CPU-ground-work'
Florian Fainelli says:
====================
net: dsa: Multi-CPU ground work (v4)
This patch series prepares the ground for adding mutliple CPU port support to
DSA, and starts by removing redundant pieces of information such as
master_netdev which is cpu_dp->ethernet. Finally drivers are moved away from
directly accessing ds->dst->cpu_dp and use appropriate helper functions.
Note that if you have Device Tree blobs/platform configurations that are
currently listing multiple CPU ports, the proposed behavior in
dsa_ds_get_cpu_dp() will be to return the last bit set in ds->cpu_port_mask.
Future plans include:
- making dst->cpu_dp a flexible data structure (array, list, you name it)
- having the ability for drivers to return a default/preferred CPU port (if
necessary)
Changes in v4:
- fixed build warning with NETPOLL enabled
Changes in v3:
- removed the last patch since it causes problems with bcm_sf2/b53 in a
dual-CPU case (root cause known, proper fix underway)
- removed dsa_ds_get_cpu_dp()
Changes in v2:
- added Reviewed-by tags
- assign port->cpu_dp earlier before ops->setup() has run
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 4 | ||||
-rw-r--r-- | drivers/net/dsa/mt7530.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 687a8bae5d73..76e98e8ed315 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -806,7 +806,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds) static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port, struct ethtool_wolinfo *wol) { - struct net_device *p = ds->dst[ds->index].master_netdev; + struct net_device *p = ds->dst[ds->index].cpu_dp->netdev; struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); struct ethtool_wolinfo pwol; @@ -829,7 +829,7 @@ static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port, static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port, struct ethtool_wolinfo *wol) { - struct net_device *p = ds->dst[ds->index].master_netdev; + struct net_device *p = ds->dst[ds->index].cpu_dp->netdev; struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); s8 cpu_port = ds->dst->cpu_dp->index; struct ethtool_wolinfo pwol; diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 25e00d5e0eec..1e46418a3b74 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -912,11 +912,11 @@ mt7530_setup(struct dsa_switch *ds) struct device_node *dn; struct mt7530_dummy_poll p; - /* The parent node of master_netdev which holds the common system + /* The parent node of cpu_dp->netdev which holds the common system * controller also is the container for two GMACs nodes representing * as two netdev instances. */ - dn = ds->master_netdev->dev.of_node->parent; + dn = ds->dst->cpu_dp->netdev->dev.of_node->parent; priv->ethernet = syscon_node_to_regmap(dn); if (IS_ERR(priv->ethernet)) return PTR_ERR(priv->ethernet); |