diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-14 08:03:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-14 08:03:44 +0200 |
commit | 64f3b5a6bc49adf77d58eddd72a4bfccd492fa24 (patch) | |
tree | cdd6aa7a0d21482ae4d1e76d837f3712c8c6481d /net/dsa/dsa.c | |
parent | d73dc7b182be4238b75278bfae16afb4c5564a58 (diff) | |
parent | 8e929cb546ee42c9a61d24fae60605e9e3192354 (diff) |
Merge 6.12-rc3 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 668c729946ea..1664547deffd 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -1577,6 +1577,7 @@ EXPORT_SYMBOL_GPL(dsa_unregister_switch); void dsa_switch_shutdown(struct dsa_switch *ds) { struct net_device *conduit, *user_dev; + LIST_HEAD(close_list); struct dsa_port *dp; mutex_lock(&dsa2_mutex); @@ -1586,10 +1587,16 @@ void dsa_switch_shutdown(struct dsa_switch *ds) rtnl_lock(); + dsa_switch_for_each_cpu_port(dp, ds) + list_add(&dp->conduit->close_list, &close_list); + + dev_close_many(&close_list, true); + dsa_switch_for_each_user_port(dp, ds) { conduit = dsa_port_to_conduit(dp); user_dev = dp->user; + netif_device_detach(user_dev); netdev_upper_dev_unlink(conduit, user_dev); } |