From: Sowmini Varadhan <sowmini.varad...@oracle.com>
Date: Sat, 5 Dec 2015 15:33:00 -0500

> +static void i40e_get_platform_mac_addr(struct pci_dev *pdev, struct i40e_pf 
> *pf)
> +{
> +     struct device_node *dp = pci_device_to_OF_node(pdev);
> +     const unsigned char *addr;
> +     u8 *mac_addr = pf->hw.mac.addr;
> +
> +     pf->flags &= ~I40E_FLAG_PF_MAC;
> +     addr = of_get_mac_address(dp);
> +     if (addr) {
> +             ether_addr_copy(mac_addr, addr);
> +             pf->flags |= I40E_FLAG_PF_MAC;
> +     }
> +#ifdef CONFIG_SPARC
> +     ether_addr_copy(mac_addr, idprom->id_ethaddr);
> +     pf->flags |= I40E_FLAG_PF_MAC;
> +#endif /* CONFIG_SPARC */
> +}

This logic doesn't look right.

If we find an address via of_get_mac_address() we should not use the
IDPROM address.  But here you are, since the IDPROM code runs
unconditionally.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to