From: David Miller <davem@davemloft.net>
To: sowmini.varadhan@oracle.com
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com,
jesse.brandeburg@intel.com, shannon.nelson@intel.com,
carolyn.wyborny@intel.com, donald.c.skidmore@intel.com,
matthew.vick@intel.com, john.ronciak@intel.com,
mitch.a.williams@intel.com, andy.shevchenko@gmail.com
Subject: Re: [PATCH v8] i40e: Look up MAC address in Open Firmware or IDPROM
Date: Sat, 05 Dec 2015 23:12:53 -0500 (EST) [thread overview]
Message-ID: <20151205.231253.1057553137456534699.davem@davemloft.net> (raw)
In-Reply-To: <20151205203300.GA8863@oracle.com>
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.
prev parent reply other threads:[~2015-12-06 4:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-05 20:33 Sowmini Varadhan
2015-12-06 4:12 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151205.231253.1057553137456534699.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andy.shevchenko@gmail.com \
--cc=carolyn.wyborny@intel.com \
--cc=donald.c.skidmore@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.vick@intel.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@intel.com \
--cc=sowmini.varadhan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®