Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Tantilov <emil.s.tantilov@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 2/2] ixgbevf: fix MAC address changes through ixgbevf_set_mac()
Date: Mon, 14 May 2018 11:16:16 -0700	[thread overview]
Message-ID: <20180514181616.26797.73490.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20180514181449.26797.30080.stgit@localhost6.localdomain6>

Set hw->mac.perm_addr in ixgbevf_set_mac() in order to avoid losing the
custom MAC on reset. This can happen in the following case:

>ip link set $vf address $mac
>ethtool -r $vf

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 9a939dc..0830411 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -4164,6 +4164,7 @@ static int ixgbevf_set_mac(struct net_device *netdev, void *p)
 		return -EPERM;
 
 	ether_addr_copy(hw->mac.addr, addr->sa_data);
+	ether_addr_copy(hw->mac.perm_addr, addr->sa_data);
 	ether_addr_copy(netdev->dev_addr, addr->sa_data);
 
 	return 0;


  parent reply	other threads:[~2018-05-14 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 18:16 [Intel-wired-lan] [PATCH 0/2] do not reuse old MACs on VF reload Emil Tantilov
2018-05-14 18:16 ` [Intel-wired-lan] [PATCH 1/2] ixgbe: force VF to grab new MAC on driver reload Emil Tantilov
2018-05-15 22:52   ` Bowers, AndrewX
2018-05-14 18:16 ` Emil Tantilov [this message]
2018-05-15 22:52   ` [Intel-wired-lan] [PATCH 2/2] ixgbevf: fix MAC address changes through ixgbevf_set_mac() Bowers, AndrewX

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=20180514181616.26797.73490.stgit@localhost6.localdomain6 \
    --to=emil.s.tantilov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox