slave.c (9d5ef190e5615a7b63af89f88c4106a5bc127974) | slave.c (c0a8a9c274936543e436aef691499304ce3127dc) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/dsa/slave.c - Slave device handling 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#include <linux/list.h> 8#include <linux/etherdevice.h> --- 2067 unchanged lines hidden (view full) --- 2076 if (!dsa_slave_dev_check(dev)) 2077 break; 2078 2079 dp = dsa_slave_to_port(dev); 2080 2081 err = dsa_port_lag_change(dp, info->lower_state_info); 2082 return notifier_from_errno(err); 2083 } | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/dsa/slave.c - Slave device handling 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#include <linux/list.h> 8#include <linux/etherdevice.h> --- 2067 unchanged lines hidden (view full) --- 2076 if (!dsa_slave_dev_check(dev)) 2077 break; 2078 2079 dp = dsa_slave_to_port(dev); 2080 2081 err = dsa_port_lag_change(dp, info->lower_state_info); 2082 return notifier_from_errno(err); 2083 } |
2084 case NETDEV_GOING_DOWN: { 2085 struct dsa_port *dp, *cpu_dp; 2086 struct dsa_switch_tree *dst; 2087 LIST_HEAD(close_list); 2088 2089 if (!netdev_uses_dsa(dev)) 2090 return NOTIFY_DONE; 2091 2092 cpu_dp = dev->dsa_ptr; 2093 dst = cpu_dp->ds->dst; 2094 2095 list_for_each_entry(dp, &dst->ports, list) { 2096 if (!dsa_is_user_port(dp->ds, dp->index)) 2097 continue; 2098 2099 list_add(&dp->slave->close_list, &close_list); 2100 } 2101 2102 dev_close_many(&close_list, true); 2103 2104 return NOTIFY_OK; |
|
2084 } | 2105 } |
2106 default: 2107 break; 2108 } |
|
2085 2086 return NOTIFY_DONE; 2087} 2088 2089static void 2090dsa_fdb_offload_notify(struct dsa_switchdev_event_work *switchdev_work) 2091{ 2092 struct dsa_switch *ds = switchdev_work->ds; --- 243 unchanged lines hidden --- | 2109 2110 return NOTIFY_DONE; 2111} 2112 2113static void 2114dsa_fdb_offload_notify(struct dsa_switchdev_event_work *switchdev_work) 2115{ 2116 struct dsa_switch *ds = switchdev_work->ds; --- 243 unchanged lines hidden --- |