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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 075fd547421e..489de9ba5fc0 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -241,7 +241,7 @@ static void ehea_update_bcmc_registrations(void)
241 } 241 }
242 242
243 if (num_registrations) { 243 if (num_registrations) {
244 arr = kzalloc(num_registrations * sizeof(*arr), GFP_KERNEL); 244 arr = kzalloc(num_registrations * sizeof(*arr), GFP_ATOMIC);
245 if (!arr) 245 if (!arr)
246 return; /* Keep the existing array */ 246 return; /* Keep the existing array */
247 } else 247 } else
@@ -301,7 +301,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev)
301 301
302 memset(stats, 0, sizeof(*stats)); 302 memset(stats, 0, sizeof(*stats));
303 303
304 cb2 = kzalloc(PAGE_SIZE, GFP_KERNEL); 304 cb2 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
305 if (!cb2) { 305 if (!cb2) {
306 ehea_error("no mem for cb2"); 306 ehea_error("no mem for cb2");
307 goto out; 307 goto out;
@@ -1763,7 +1763,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
1763 1763
1764 memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); 1764 memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len);
1765 1765
1766 mutex_lock(&ehea_bcmc_regs.lock); 1766 spin_lock(&ehea_bcmc_regs.lock);
1767 1767
1768 /* Deregister old MAC in pHYP */ 1768 /* Deregister old MAC in pHYP */
1769 if (port->state == EHEA_PORT_UP) { 1769 if (port->state == EHEA_PORT_UP) {
@@ -1785,7 +1785,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
1785 1785
1786out_upregs: 1786out_upregs:
1787 ehea_update_bcmc_registrations(); 1787 ehea_update_bcmc_registrations();
1788 mutex_unlock(&ehea_bcmc_regs.lock); 1788 spin_unlock(&ehea_bcmc_regs.lock);
1789out_free: 1789out_free:
1790 kfree(cb0); 1790 kfree(cb0);
1791out: 1791out:
@@ -1947,7 +1947,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
1947 } 1947 }
1948 ehea_promiscuous(dev, 0); 1948 ehea_promiscuous(dev, 0);
1949 1949
1950 mutex_lock(&ehea_bcmc_regs.lock); 1950 spin_lock(&ehea_bcmc_regs.lock);
1951 1951
1952 if (dev->flags & IFF_ALLMULTI) { 1952 if (dev->flags & IFF_ALLMULTI) {
1953 ehea_allmulti(dev, 1); 1953 ehea_allmulti(dev, 1);
@@ -1978,7 +1978,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
1978 } 1978 }
1979out: 1979out:
1980 ehea_update_bcmc_registrations(); 1980 ehea_update_bcmc_registrations();
1981 mutex_unlock(&ehea_bcmc_regs.lock); 1981 spin_unlock(&ehea_bcmc_regs.lock);
1982 return; 1982 return;
1983} 1983}
1984 1984
@@ -2497,7 +2497,7 @@ static int ehea_up(struct net_device *dev)
2497 } 2497 }
2498 } 2498 }
2499 2499
2500 mutex_lock(&ehea_bcmc_regs.lock); 2500 spin_lock(&ehea_bcmc_regs.lock);
2501 2501
2502 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); 2502 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC);
2503 if (ret) { 2503 if (ret) {
@@ -2520,7 +2520,7 @@ out:
2520 ehea_info("Failed starting %s. ret=%i", dev->name, ret); 2520 ehea_info("Failed starting %s. ret=%i", dev->name, ret);
2521 2521
2522 ehea_update_bcmc_registrations(); 2522 ehea_update_bcmc_registrations();
2523 mutex_unlock(&ehea_bcmc_regs.lock); 2523 spin_unlock(&ehea_bcmc_regs.lock);
2524 2524
2525 ehea_update_firmware_handles(); 2525 ehea_update_firmware_handles();
2526 mutex_unlock(&ehea_fw_handles.lock); 2526 mutex_unlock(&ehea_fw_handles.lock);
@@ -2575,7 +2575,7 @@ static int ehea_down(struct net_device *dev)
2575 2575
2576 mutex_lock(&ehea_fw_handles.lock); 2576 mutex_lock(&ehea_fw_handles.lock);
2577 2577
2578 mutex_lock(&ehea_bcmc_regs.lock); 2578 spin_lock(&ehea_bcmc_regs.lock);
2579 ehea_drop_multicast_list(dev); 2579 ehea_drop_multicast_list(dev);
2580 ehea_broadcast_reg_helper(port, H_DEREG_BCMC); 2580 ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
2581 2581
@@ -2584,7 +2584,7 @@ static int ehea_down(struct net_device *dev)
2584 port->state = EHEA_PORT_DOWN; 2584 port->state = EHEA_PORT_DOWN;
2585 2585
2586 ehea_update_bcmc_registrations(); 2586 ehea_update_bcmc_registrations();
2587 mutex_unlock(&ehea_bcmc_regs.lock); 2587 spin_unlock(&ehea_bcmc_regs.lock);
2588 2588
2589 ret = ehea_clean_all_portres(port); 2589 ret = ehea_clean_all_portres(port);
2590 if (ret) 2590 if (ret)
@@ -3590,7 +3590,7 @@ int __init ehea_module_init(void)
3590 memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); 3590 memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs));
3591 3591
3592 mutex_init(&ehea_fw_handles.lock); 3592 mutex_init(&ehea_fw_handles.lock);
3593 mutex_init(&ehea_bcmc_regs.lock); 3593 spin_lock_init(&ehea_bcmc_regs.lock);
3594 3594
3595 ret = check_module_parm(); 3595 ret = check_module_parm();
3596 if (ret) 3596 if (ret)