Merge v5.14-rc3 into usb-next
[linux-2.6-microblaze.git] / drivers / net / ethernet / freescale / fman / mac.c
index 901749a..d9fc5c4 100644 (file)
@@ -524,6 +524,7 @@ static void setup_memac(struct mac_device *mac_dev)
        | SUPPORTED_Autoneg \
        | SUPPORTED_Pause \
        | SUPPORTED_Asym_Pause \
+       | SUPPORTED_FIBRE \
        | SUPPORTED_MII)
 
 static DEFINE_MUTEX(eth_lock);
@@ -605,7 +606,6 @@ static int mac_probe(struct platform_device *_of_dev)
        struct platform_device  *of_dev;
        struct resource          res;
        struct mac_priv_s       *priv;
-       const u8                *mac_addr;
        u32                      val;
        u8                      fman_id;
        phy_interface_t          phy_if;
@@ -723,11 +723,9 @@ static int mac_probe(struct platform_device *_of_dev)
        priv->cell_index = (u8)val;
 
        /* Get the MAC address */
-       mac_addr = of_get_mac_address(mac_node);
-       if (IS_ERR(mac_addr))
+       err = of_get_mac_address(mac_node, mac_dev->addr);
+       if (err)
                dev_warn(dev, "of_get_mac_address(%pOF) failed\n", mac_node);
-       else
-               ether_addr_copy(mac_dev->addr, mac_addr);
 
        /* Get the port handles */
        nph = of_count_phandle_with_args(mac_node, "fsl,fman-ports", NULL);
@@ -853,7 +851,7 @@ static int mac_probe(struct platform_device *_of_dev)
        if (err < 0)
                dev_err(dev, "fman_set_mac_active_pause() = %d\n", err);
 
-       if (!IS_ERR(mac_addr))
+       if (!is_zero_ether_addr(mac_dev->addr))
                dev_info(dev, "FMan MAC address: %pM\n", mac_dev->addr);
 
        priv->eth_dev = dpaa_eth_add_device(fman_id, mac_dev);