blob: 334e9bedb1a13aff318388331f5c73826627fe04 [file] [log] [blame]
John Lo3190f7e2016-07-11 18:09:51 -04001From e5b60cf1199c51ee51c287988bdda3522fee748c Mon Sep 17 00:00:00 2001
2From: Nelson Escobar <neescoba@cisco.com>
3Date: Thu, 7 Jul 2016 18:10:21 -0700
4Subject: [PATCH 1/2] net/enic: fix setting MAC address when a port is
5 restarted
6
7enic_disable() removed the MAC address when a port was shut down but
8enic_enable() didn't add the MAC address back when the port was
9started again. Move where we set the MAC address for the adapter from
10enic_setup_finish() to a enic_enable() so that port restarting works
11properly.
12
13Fixes: fefed3d1e62c ("enic: new driver")
14
15Signed-off-by: Nelson Escobar <neescoba@cisco.com>
16Reviewed-by: John Daley <johndale@cisco.com>
17---
18 drivers/net/enic/enic_main.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
22index d4e43b5..5d47c01 100644
23--- a/drivers/net/enic/enic_main.c
24+++ b/drivers/net/enic/enic_main.c
25@@ -468,6 +468,8 @@ int enic_enable(struct enic *enic)
26 for (index = 0; index < enic->rq_count; index++)
27 enic_start_rq(enic, index);
28
29+ vnic_dev_add_addr(enic->vdev, enic->mac_addr);
30+
31 vnic_dev_enable_wait(enic->vdev);
32
33 /* Register and enable error interrupt */
34@@ -971,8 +973,6 @@ int enic_setup_finish(struct enic *enic)
35 return -1;
36 }
37
38- vnic_dev_add_addr(enic->vdev, enic->mac_addr);
39-
40 /* Default conf */
41 vnic_dev_packet_filter(enic->vdev,
42 1 /* directed */,
43--
442.7.0
45