diff options
author | 2017-06-13 16:35:04 -0400 | |
---|---|---|
committer | 2017-06-13 16:35:04 -0400 | |
commit | b217566a525ff24334d17635a865f44b68c2c583 (patch) | |
tree | 1f4d13a47187b7662ea5369ffe163deee2c79550 /include | |
parent | cxgb4: handle serial flash interrupt (diff) | |
parent | net: dsa: Introduce dsa_get_cpu_port() (diff) | |
download | wireguard-linux-b217566a525ff24334d17635a865f44b68c2c583.tar.xz wireguard-linux-b217566a525ff24334d17635a865f44b68c2c583.zip |
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 'include')
-rw-r--r-- | include/net/dsa.h | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 2effb0af9d7c..58969b9a090c 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -122,12 +122,6 @@ struct dsa_switch_tree { */ struct dsa_platform_data *pd; - /* - * Reference to network device to use, and which tagging - * protocol to use. - */ - struct net_device *master_netdev; - /* Copy of tag_ops->rcv for faster access in hot path */ struct sk_buff * (*rcv)(struct sk_buff *skb, struct net_device *dev, @@ -135,12 +129,6 @@ struct dsa_switch_tree { struct net_device *orig_dev); /* - * Original copy of the master netdev ethtool_ops - */ - struct ethtool_ops master_ethtool_ops; - const struct ethtool_ops *master_orig_ethtool_ops; - - /* * The switch port to which the CPU is attached. */ struct dsa_port *cpu_dp; @@ -183,12 +171,18 @@ struct dsa_port { struct dsa_switch *ds; unsigned int index; const char *name; + struct dsa_port *cpu_dp; struct net_device *netdev; struct device_node *dn; unsigned int ageing_time; u8 stp_state; struct net_device *bridge_dev; struct devlink_port devlink_port; + /* + * Original copy of the master netdev ethtool_ops + */ + struct ethtool_ops ethtool_ops; + const struct ethtool_ops *orig_ethtool_ops; }; struct dsa_switch { @@ -227,11 +221,6 @@ struct dsa_switch { s8 rtable[DSA_MAX_SWITCHES]; /* - * The lower device this switch uses to talk to the host - */ - struct net_device *master_netdev; - - /* * Slave mii_bus and devices for the individual ports. */ u32 dsa_port_mask; |