DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nelson Escobar <neescoba@cisco.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, Nelson Escobar <neescoba@cisco.com>
Subject: [dpdk-dev] [PATCH 1/2] net/enic: fix setting MAC address when a port is restarted
Date: Thu,  7 Jul 2016 18:10:21 -0700	[thread overview]
Message-ID: <1467940221-11341-1-git-send-email-neescoba@cisco.com> (raw)

enic_disable() removed the MAC address when a port was shut down but
enic_enable() didn't add the MAC address back when the port was
started again. Move where we set the MAC address for the adapter from
enic_setup_finish() to a enic_enable() so that port restarting works
properly.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 8eacf2d..1f3d14e 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -455,6 +455,8 @@ int enic_enable(struct enic *enic)
 	for (index = 0; index < enic->rq_count; index++)
 		enic_start_rq(enic, index);
 
+	vnic_dev_add_addr(enic->vdev, enic->mac_addr);
+
 	vnic_dev_enable_wait(enic->vdev);
 
 	/* Register and enable error interrupt */
@@ -971,8 +973,6 @@ int enic_setup_finish(struct enic *enic)
 		return -1;
 	}
 
-	vnic_dev_add_addr(enic->vdev, enic->mac_addr);
-
 	/* Default conf */
 	vnic_dev_packet_filter(enic->vdev,
 		1 /* directed  */,
-- 
2.7.0

             reply	other threads:[~2016-07-08  1:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08  1:10 Nelson Escobar [this message]
2016-07-08 21:00 ` Bruce Richardson

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=1467940221-11341-1-git-send-email-neescoba@cisco.com \
    --to=neescoba@cisco.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).