net/bnx2x: fix to add PHY lock
[dpdk.git] / drivers / net / failsafe / failsafe_ether.c
index 191f95f..f2512c4 100644 (file)
@@ -179,6 +179,23 @@ fs_eth_dev_conf_apply(struct rte_eth_dev *dev,
                        return ret;
                }
        }
+       /*
+        * Propagate multicast MAC addresses to sub-devices,
+        * if non zero number of addresses is set.
+        * The condition is required to avoid breakage of failsafe
+        * for sub-devices which do not support the operation
+        * if the feature is really not used.
+        */
+       if (PRIV(dev)->nb_mcast_addr > 0) {
+               DEBUG("Configuring multicast MAC addresses");
+               ret = rte_eth_dev_set_mc_addr_list(PORT_ID(sdev),
+                                                  PRIV(dev)->mcast_addrs,
+                                                  PRIV(dev)->nb_mcast_addr);
+               if (ret) {
+                       ERROR("Failed to apply multicast MAC addresses");
+                       return ret;
+               }
+       }
        /* VLAN filter */
        vfc1 = &dev->data->vlan_filter_conf;
        vfc2 = &edev->data->vlan_filter_conf;
@@ -265,8 +282,7 @@ fs_dev_remove(struct sub_device *sdev)
                sdev->state = DEV_PROBED;
                /* fallthrough */
        case DEV_PROBED:
-               ret = rte_eal_hotplug_remove(sdev->bus->name,
-                                            sdev->dev->name);
+               ret = rte_dev_remove(sdev->dev);
                if (ret) {
                        ERROR("Bus detach failed for sub_device %u",
                              SUB_ID(sdev));