diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2019-02-27 22:44:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-27 23:39:56 +0300 |
commit | 56da64bc003bb9d39b69017074dd7909c72b68b1 (patch) | |
tree | 44e51b0d6f382245b36af7f253d9e516f862f568 /drivers/net/ethernet/mscc/ocelot_board.c | |
parent | 7464251b15d98e31f0c0aec2f883db979d15f9f1 (diff) | |
download | linux-56da64bc003bb9d39b69017074dd7909c72b68b1.tar.xz |
net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_SET
Following patches will change the way we communicate setting a port's
attribute and use notifiers to perform those tasks.
Ocelot does not currently have an atomic notifier registered for
switchdev events, so we need to register one in order to deal with
atomic context SWITCHDEV_PORT_ATTR_SET events.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_board.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_board.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c index ca3ea2fbfcd0..2c1121d86edf 100644 --- a/drivers/net/ethernet/mscc/ocelot_board.c +++ b/drivers/net/ethernet/mscc/ocelot_board.c @@ -329,6 +329,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev) } register_netdevice_notifier(&ocelot_netdevice_nb); + register_switchdev_notifier(&ocelot_switchdev_nb); register_switchdev_blocking_notifier(&ocelot_switchdev_blocking_nb); dev_info(&pdev->dev, "Ocelot switch probed\n"); @@ -345,6 +346,7 @@ static int mscc_ocelot_remove(struct platform_device *pdev) ocelot_deinit(ocelot); unregister_switchdev_blocking_notifier(&ocelot_switchdev_blocking_nb); + unregister_switchdev_notifier(&ocelot_switchdev_nb); unregister_netdevice_notifier(&ocelot_netdevice_nb); return 0; |