Commit 9f8f3507 authored by David S. Miller's avatar David S. Miller

Merge branch 'Bonding-fixes-for-Ocelot-switch'

Vladimir Oltean says:

====================
Bonding fixes for Ocelot switch

This series fixes 2 issues with bonding in a system that integrates the
ocelot driver, but the ports that are bonded do not actually belong to
ocelot.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents cc59dbcc 3b3eed8e
...@@ -1680,9 +1680,6 @@ static int ocelot_netdevice_port_event(struct net_device *dev, ...@@ -1680,9 +1680,6 @@ static int ocelot_netdevice_port_event(struct net_device *dev,
struct ocelot_port *ocelot_port = netdev_priv(dev); struct ocelot_port *ocelot_port = netdev_priv(dev);
int err = 0; int err = 0;
if (!ocelot_netdevice_dev_check(dev))
return 0;
switch (event) { switch (event) {
case NETDEV_CHANGEUPPER: case NETDEV_CHANGEUPPER:
if (netif_is_bridge_master(info->upper_dev)) { if (netif_is_bridge_master(info->upper_dev)) {
...@@ -1719,12 +1716,16 @@ static int ocelot_netdevice_event(struct notifier_block *unused, ...@@ -1719,12 +1716,16 @@ static int ocelot_netdevice_event(struct notifier_block *unused,
struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net_device *dev = netdev_notifier_info_to_dev(ptr);
int ret = 0; int ret = 0;
if (!ocelot_netdevice_dev_check(dev))
return 0;
if (event == NETDEV_PRECHANGEUPPER && if (event == NETDEV_PRECHANGEUPPER &&
netif_is_lag_master(info->upper_dev)) { netif_is_lag_master(info->upper_dev)) {
struct netdev_lag_upper_info *lag_upper_info = info->upper_info; struct netdev_lag_upper_info *lag_upper_info = info->upper_info;
struct netlink_ext_ack *extack; struct netlink_ext_ack *extack;
if (lag_upper_info->tx_type != NETDEV_LAG_TX_TYPE_HASH) { if (lag_upper_info &&
lag_upper_info->tx_type != NETDEV_LAG_TX_TYPE_HASH) {
extack = netdev_notifier_info_to_extack(&info->info); extack = netdev_notifier_info_to_extack(&info->info);
NL_SET_ERR_MSG_MOD(extack, "LAG device using unsupported Tx type"); NL_SET_ERR_MSG_MOD(extack, "LAG device using unsupported Tx type");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment