diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index f07af2c3bcbe..b5c8eb96bd26 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -434,7 +434,7 @@ struct ehea_bcmc_reg_entry { | |||
434 | struct ehea_bcmc_reg_array { | 434 | struct ehea_bcmc_reg_array { |
435 | struct ehea_bcmc_reg_entry *arr; | 435 | struct ehea_bcmc_reg_entry *arr; |
436 | int num_entries; | 436 | int num_entries; |
437 | struct semaphore lock; | 437 | struct mutex lock; |
438 | }; | 438 | }; |
439 | 439 | ||
440 | #define EHEA_PORT_UP 1 | 440 | #define EHEA_PORT_UP 1 |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 0cfc7e2ce395..73dd6f9dfbbe 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1759,7 +1759,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1759 | 1759 | ||
1760 | memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); | 1760 | memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len); |
1761 | 1761 | ||
1762 | down(&ehea_bcmc_regs.lock); | 1762 | mutex_lock(&ehea_bcmc_regs.lock); |
1763 | 1763 | ||
1764 | /* Deregister old MAC in pHYP */ | 1764 | /* Deregister old MAC in pHYP */ |
1765 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); | 1765 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); |
@@ -1777,7 +1777,7 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1777 | 1777 | ||
1778 | out_upregs: | 1778 | out_upregs: |
1779 | ehea_update_bcmc_registrations(); | 1779 | ehea_update_bcmc_registrations(); |
1780 | up(&ehea_bcmc_regs.lock); | 1780 | mutex_unlock(&ehea_bcmc_regs.lock); |
1781 | out_free: | 1781 | out_free: |
1782 | kfree(cb0); | 1782 | kfree(cb0); |
1783 | out: | 1783 | out: |
@@ -1939,7 +1939,7 @@ static void ehea_set_multicast_list(struct net_device *dev) | |||
1939 | } | 1939 | } |
1940 | ehea_promiscuous(dev, 0); | 1940 | ehea_promiscuous(dev, 0); |
1941 | 1941 | ||
1942 | down(&ehea_bcmc_regs.lock); | 1942 | mutex_lock(&ehea_bcmc_regs.lock); |
1943 | 1943 | ||
1944 | if (dev->flags & IFF_ALLMULTI) { | 1944 | if (dev->flags & IFF_ALLMULTI) { |
1945 | ehea_allmulti(dev, 1); | 1945 | ehea_allmulti(dev, 1); |
@@ -1970,7 +1970,7 @@ static void ehea_set_multicast_list(struct net_device *dev) | |||
1970 | } | 1970 | } |
1971 | out: | 1971 | out: |
1972 | ehea_update_bcmc_registrations(); | 1972 | ehea_update_bcmc_registrations(); |
1973 | up(&ehea_bcmc_regs.lock); | 1973 | mutex_unlock(&ehea_bcmc_regs.lock); |
1974 | return; | 1974 | return; |
1975 | } | 1975 | } |
1976 | 1976 | ||
@@ -2491,7 +2491,7 @@ static int ehea_up(struct net_device *dev) | |||
2491 | } | 2491 | } |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | down(&ehea_bcmc_regs.lock); | 2494 | mutex_lock(&ehea_bcmc_regs.lock); |
2495 | 2495 | ||
2496 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); | 2496 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); |
2497 | if (ret) { | 2497 | if (ret) { |
@@ -2514,7 +2514,7 @@ out: | |||
2514 | ehea_info("Failed starting %s. ret=%i", dev->name, ret); | 2514 | ehea_info("Failed starting %s. ret=%i", dev->name, ret); |
2515 | 2515 | ||
2516 | ehea_update_bcmc_registrations(); | 2516 | ehea_update_bcmc_registrations(); |
2517 | up(&ehea_bcmc_regs.lock); | 2517 | mutex_unlock(&ehea_bcmc_regs.lock); |
2518 | 2518 | ||
2519 | ehea_update_firmware_handles(); | 2519 | ehea_update_firmware_handles(); |
2520 | mutex_unlock(&ehea_fw_handles.lock); | 2520 | mutex_unlock(&ehea_fw_handles.lock); |
@@ -2569,7 +2569,7 @@ static int ehea_down(struct net_device *dev) | |||
2569 | 2569 | ||
2570 | mutex_lock(&ehea_fw_handles.lock); | 2570 | mutex_lock(&ehea_fw_handles.lock); |
2571 | 2571 | ||
2572 | down(&ehea_bcmc_regs.lock); | 2572 | mutex_lock(&ehea_bcmc_regs.lock); |
2573 | ehea_drop_multicast_list(dev); | 2573 | ehea_drop_multicast_list(dev); |
2574 | ehea_broadcast_reg_helper(port, H_DEREG_BCMC); | 2574 | ehea_broadcast_reg_helper(port, H_DEREG_BCMC); |
2575 | 2575 | ||
@@ -2578,7 +2578,7 @@ static int ehea_down(struct net_device *dev) | |||
2578 | port->state = EHEA_PORT_DOWN; | 2578 | port->state = EHEA_PORT_DOWN; |
2579 | 2579 | ||
2580 | ehea_update_bcmc_registrations(); | 2580 | ehea_update_bcmc_registrations(); |
2581 | up(&ehea_bcmc_regs.lock); | 2581 | mutex_unlock(&ehea_bcmc_regs.lock); |
2582 | 2582 | ||
2583 | ret = ehea_clean_all_portres(port); | 2583 | ret = ehea_clean_all_portres(port); |
2584 | if (ret) | 2584 | if (ret) |
@@ -3545,7 +3545,7 @@ int __init ehea_module_init(void) | |||
3545 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); | 3545 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); |
3546 | 3546 | ||
3547 | mutex_init(&ehea_fw_handles.lock); | 3547 | mutex_init(&ehea_fw_handles.lock); |
3548 | sema_init(&ehea_bcmc_regs.lock, 1); | 3548 | mutex_init(&ehea_bcmc_regs.lock); |
3549 | 3549 | ||
3550 | ret = check_module_parm(); | 3550 | ret = check_module_parm(); |
3551 | if (ret) | 3551 | if (ret) |