diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-01-07 02:24:03 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-08 00:42:07 +0100 |
commit | 1dbb130281c447fdd061475931e1eb7baf475f53 (patch) | |
tree | a1354208c145fbbc9694a024016741a022a21e3a /net/dsa | |
parent | net: systemport: use standard netdevice notifier to detect DSA presence (diff) | |
download | linux-1dbb130281c447fdd061475931e1eb7baf475f53.tar.xz linux-1dbb130281c447fdd061475931e1eb7baf475f53.zip |
net: dsa: remove the DSA specific notifiers
This effectively reverts commit 60724d4bae14 ("net: dsa: Add support for
DSA specific notifiers"). The reason is that since commit 2f1e8ea726e9
("net: dsa: link interfaces with the DSA master to get rid of lockdep
warnings"), it appears that there is a generic way to achieve the same
purpose. The only user thus far, the Broadcom SYSTEMPORT driver, was
converted to use the generic notifiers.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa.c | 22 | ||||
-rw-r--r-- | net/dsa/slave.c | 17 |
2 files changed, 0 insertions, 39 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index a1b1dc8a4d87..df75481b12ed 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -309,28 +309,6 @@ bool dsa_schedule_work(struct work_struct *work) return queue_work(dsa_owq, work); } -static ATOMIC_NOTIFIER_HEAD(dsa_notif_chain); - -int register_dsa_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&dsa_notif_chain, nb); -} -EXPORT_SYMBOL_GPL(register_dsa_notifier); - -int unregister_dsa_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&dsa_notif_chain, nb); -} -EXPORT_SYMBOL_GPL(unregister_dsa_notifier); - -int call_dsa_notifiers(unsigned long val, struct net_device *dev, - struct dsa_notifier_info *info) -{ - info->dev = dev; - return atomic_notifier_call_chain(&dsa_notif_chain, val, info); -} -EXPORT_SYMBOL_GPL(call_dsa_notifiers); - int dsa_devlink_param_get(struct devlink *dl, u32 id, struct devlink_param_gset_ctx *ctx) { diff --git a/net/dsa/slave.c b/net/dsa/slave.c index d7f9fbb93589..c8b842ac2600 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1764,20 +1764,6 @@ int dsa_slave_resume(struct net_device *slave_dev) return 0; } -static void dsa_slave_notify(struct net_device *dev, unsigned long val) -{ - struct net_device *master = dsa_slave_to_master(dev); - struct dsa_port *dp = dsa_slave_to_port(dev); - struct dsa_notifier_register_info rinfo = { - .switch_number = dp->ds->index, - .port_number = dp->index, - .master = master, - .info.dev = dev, - }; - - call_dsa_notifiers(val, dev, &rinfo.info); -} - int dsa_slave_create(struct dsa_port *port) { const struct dsa_port *cpu_dp = port->cpu_dp; @@ -1863,8 +1849,6 @@ int dsa_slave_create(struct dsa_port *port) goto out_gcells; } - dsa_slave_notify(slave_dev, DSA_PORT_REGISTER); - rtnl_lock(); ret = register_netdevice(slave_dev); @@ -1913,7 +1897,6 @@ void dsa_slave_destroy(struct net_device *slave_dev) phylink_disconnect_phy(dp->pl); rtnl_unlock(); - dsa_slave_notify(slave_dev, DSA_PORT_UNREGISTER); phylink_destroy(dp->pl); gro_cells_destroy(&p->gcells); free_percpu(slave_dev->tstats); |