Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1284788
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8] i40e: Look up MAC address in Open Firmware or IDPROM |
| Date | 2015-12-06 05:20 +0100 |
| Message-ID | <qCyXL-20P-5@gated-at.bofh.it> (permalink) |
| References | <qCrMC-5MG-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Sowmini Varadhan <sowmini.varadhan@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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v8] i40e: Look up MAC address in Open Firmware or IDPROM Sowmini Varadhan <sowmini.varadhan@oracle.com> - 2015-12-05 21:40 +0100 Re: [PATCH v8] i40e: Look up MAC address in Open Firmware or IDPROM David Miller <davem@davemloft.net> - 2015-12-06 05:20 +0100
csiph-web