From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from alln-iport-2.cisco.com (alln-iport-2.cisco.com [173.37.142.89]) by dpdk.org (Postfix) with ESMTP id 6D8D4532D for ; Fri, 8 Jul 2016 03:10:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1219; q=dns/txt; s=iport; t=1467940241; x=1469149841; h=from:to:cc:subject:date:message-id; bh=Y1raR5qbXVAjDm9UICQmZUFOfBabT6rsxLF33P8UoAY=; b=RiE6492NjCM1kNOamZhIzJUjFoSOZnI36MtXLqGQ39ug/Iak3O9d5nvi /qiMhOyeL4fI0lF6f+EiWlkWFKa2g9FXtZl4l4B2aX+jAziVvtbsm7WkV uKbntM+Xg76lMdoMg8DXmW8akuhYgkh5wRMGM4R76zDrj3DvNSXh+zDnT g=; X-IronPort-AV: E=Sophos;i="5.28,326,1464652800"; d="scan'208";a="293576637" Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2016 01:10:40 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id u681Aehn008484; Fri, 8 Jul 2016 01:10:40 GMT Received: by cisco.com (Postfix, from userid 412739) id 814593FAAE09; Thu, 7 Jul 2016 18:10:40 -0700 (PDT) From: Nelson Escobar To: dev@dpdk.org Cc: bruce.richardson@intel.com, Nelson Escobar Date: Thu, 7 Jul 2016 18:10:21 -0700 Message-Id: <1467940221-11341-1-git-send-email-neescoba@cisco.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH 1/2] net/enic: fix setting MAC address when a port is restarted X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 01:10:41 -0000 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 Reviewed-by: John Daley --- 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