[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YBIJZuy6iXeNQpxm@lunn.ch>
Date: Thu, 28 Jan 2021 01:46:30 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <olteanv@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
Subject: Re: [PATCH net-next 2/4] net: dsa: automatically bring user ports
down when master goes down
> + case NETDEV_GOING_DOWN: {
> + struct dsa_port *dp, *cpu_dp;
> + struct dsa_switch_tree *dst;
> + int err = 0;
> +
> + if (!netdev_uses_dsa(dev))
> + return NOTIFY_DONE;
> +
> + cpu_dp = dev->dsa_ptr;
> + dst = cpu_dp->ds->dst;
> +
> + list_for_each_entry(dp, &dst->ports, list) {
> + if (!dsa_is_user_port(dp->ds, dp->index)) {
!dsa_is_user_port() ??
That ! seems odd.
> + struct net_device *slave = dp->slave;
> +
> + if (!(slave->flags & IFF_UP))
> + continue;
> +
> + err = dev_change_flags(slave,
> + slave->flags & ~IFF_UP,
> + NULL);
Andrew
Powered by blists - more mailing lists