aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index d1b6d4e7495d..075fd547421e 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1766,16 +1766,20 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
1766 mutex_lock(&ehea_bcmc_regs.lock); 1766 mutex_lock(&ehea_bcmc_regs.lock);
1767 1767
1768 /* Deregister old MAC in pHYP */ 1768 /* Deregister old MAC in pHYP */
1769 ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); 1769 if (port->state == EHEA_PORT_UP) {
1770 if (ret) 1770 ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
1771 goto out_upregs; 1771 if (ret)
1772 goto out_upregs;
1773 }
1772 1774
1773 port->mac_addr = cb0->port_mac_addr << 16; 1775 port->mac_addr = cb0->port_mac_addr << 16;
1774 1776
1775 /* Register new MAC in pHYP */ 1777 /* Register new MAC in pHYP */
1776 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); 1778 if (port->state == EHEA_PORT_UP) {
1777 if (ret) 1779 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC);
1778 goto out_upregs; 1780 if (ret)
1781 goto out_upregs;
1782 }
1779 1783
1780 ret = 0; 1784 ret = 0;
1781 1785
@@ -2213,8 +2217,6 @@ static void ehea_vlan_rx_register(struct net_device *dev,
2213 goto out; 2217 goto out;
2214 } 2218 }
2215 2219
2216 memset(cb1->vlan_filter, 0, sizeof(cb1->vlan_filter));
2217
2218 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, 2220 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id,
2219 H_PORT_CB1, H_PORT_CB1_ALL, cb1); 2221 H_PORT_CB1, H_PORT_CB1_ALL, cb1);
2220 if (hret != H_SUCCESS) 2222 if (hret != H_SUCCESS)
@@ -2603,7 +2605,8 @@ static int ehea_stop(struct net_device *dev)
2603 if (netif_msg_ifdown(port)) 2605 if (netif_msg_ifdown(port))
2604 ehea_info("disabling port %s", dev->name); 2606 ehea_info("disabling port %s", dev->name);
2605 2607
2606 flush_scheduled_work(); 2608 cancel_work_sync(&port->reset_task);
2609
2607 mutex_lock(&port->port_lock); 2610 mutex_lock(&port->port_lock);
2608 netif_stop_queue(dev); 2611 netif_stop_queue(dev);
2609 port_napi_disable(port); 2612 port_napi_disable(port);
@@ -3178,11 +3181,12 @@ out_err:
3178 3181
3179static void ehea_shutdown_single_port(struct ehea_port *port) 3182static void ehea_shutdown_single_port(struct ehea_port *port)
3180{ 3183{
3184 struct ehea_adapter *adapter = port->adapter;
3181 unregister_netdev(port->netdev); 3185 unregister_netdev(port->netdev);
3182 ehea_unregister_port(port); 3186 ehea_unregister_port(port);
3183 kfree(port->mc_list); 3187 kfree(port->mc_list);
3184 free_netdev(port->netdev); 3188 free_netdev(port->netdev);
3185 port->adapter->active_ports--; 3189 adapter->active_ports--;
3186} 3190}
3187 3191
3188static int ehea_setup_ports(struct ehea_adapter *adapter) 3192static int ehea_setup_ports(struct ehea_adapter *adapter)