summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNelson Escobar <neescoba@cisco.com>2016-07-07 18:10:21 -0700
committerBruce Richardson <bruce.richardson@intel.com>2016-07-08 22:59:08 +0200
commite5b60cf1199c51ee51c287988bdda3522fee748c (patch)
treed9625f6a6e59a960ea95711606c0e44368e06922 /drivers
parent0392743c3f0928fb0f7a161d9131d2a174b5c994 (diff)
downloaddpdk-e5b60cf1199c51ee51c287988bdda3522fee748c.zip
dpdk-e5b60cf1199c51ee51c287988bdda3522fee748c.tar.gz
dpdk-e5b60cf1199c51ee51c287988bdda3522fee748c.tar.xz
net/enic: fix setting MAC address when a port is restarted
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/enic/enic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index d4e43b5..5d47c01 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -456,6 +456,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 */
@@ -972,8 +974,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 */,