John Lo | 3190f7e | 2016-07-11 18:09:51 -0400 | [diff] [blame] | 1 | From e5b60cf1199c51ee51c287988bdda3522fee748c Mon Sep 17 00:00:00 2001 |
| 2 | From: Nelson Escobar <neescoba@cisco.com> |
| 3 | Date: Thu, 7 Jul 2016 18:10:21 -0700 |
| 4 | Subject: [PATCH 1/2] net/enic: fix setting MAC address when a port is |
| 5 | restarted |
| 6 | |
| 7 | enic_disable() removed the MAC address when a port was shut down but |
| 8 | enic_enable() didn't add the MAC address back when the port was |
| 9 | started again. Move where we set the MAC address for the adapter from |
| 10 | enic_setup_finish() to a enic_enable() so that port restarting works |
| 11 | properly. |
| 12 | |
| 13 | Fixes: fefed3d1e62c ("enic: new driver") |
| 14 | |
| 15 | Signed-off-by: Nelson Escobar <neescoba@cisco.com> |
| 16 | Reviewed-by: John Daley <johndale@cisco.com> |
| 17 | --- |
| 18 | drivers/net/enic/enic_main.c | 4 ++-- |
| 19 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 20 | |
| 21 | diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c |
| 22 | index 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 | -- |
| 44 | 2.7.0 |
| 45 | |