From: Duyck, Alexander H <alexander.h.duyck@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] Patch for igb_main.c
Date: Mon, 26 Mar 2018 15:39:38 +0000 [thread overview]
Message-ID: <1522078775.2528.65.camel@intel.com> (raw)
In-Reply-To: <CAAMvbhES0YLfp__ErFxivfMHhpCrOq0z47a4w84JP547VBhd_Q@mail.gmail.com>
On Mon, 2018-03-26 at 00:46 +0100, James Courtier-Dutton wrote:
> Hi,
>
> I have a patch for igb_main.c that helps bring up the igb NIC on the
> Utilite Pro embedded ARM PC.
> How do I get this added to the kernel?
> Summary below:
>
> Kind Regards
>
> James
>
>
> Author: James Courtier-Dutton <James.Dutton@gmail.com>
> Date: Sat Jul 1 19:27:51 2017 +0100
>
> net: igb: This helps to bring up the igb NIC by using a random MAC
> address when no other sources of MAC addres are available.
>
> This help bring up the igb NIC on the Utilite.
>
> Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
> b/drivers/net/ethernet/intel/igb/igb_main.c
> index be456ba..d7c2c99 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -2509,6 +2509,11 @@ static int igb_probe(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> dev_err(&pdev->dev, "NVM Read Error\n");
> }
>
> + if (!is_valid_ether_addr(hw->mac.addr)) {
> + dev_info(&pdev->dev, "Random MAC Address\n");
> + random_ether_addr(hw->mac.addr);
> + }
> +
> memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
>
> if (!is_valid_ether_addr(netdev->dev_addr)) {
Any idea why the MAC address is invalid? Does the part not have an NVM,
or is the NVM not populated correctly?
I'm really not a fan of us enabling a random MAC address for the device
if a valid one is not present. I would like to know more about why a
valid one is not present and see if we can address that before we start
working around it in the driver.
Thanks.
- Alex
next prev parent reply other threads:[~2018-03-26 15:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-25 23:46 [Intel-wired-lan] Patch for igb_main.c James Courtier-Dutton
2018-03-26 1:53 ` Kirsher, Jeffrey T
2018-03-26 15:39 ` Duyck, Alexander H [this message]
2018-03-26 19:00 ` James Courtier-Dutton
2018-03-26 20:10 ` Alexander Duyck
2018-03-26 20:29 ` Fujinaka, Todd
2018-03-26 20:42 ` James Courtier-Dutton
2018-03-26 21:13 ` Fujinaka, Todd
2018-03-26 21:23 ` Alexander Duyck
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=1522078775.2528.65.camel@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=intel-wired-lan@osuosl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.