diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 07c742dd3f0..a3b3b165445 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
37 | #include <linux/reboot.h> | 37 | #include <linux/reboot.h> |
38 | #include <asm/kexec.h> | 38 | #include <asm/kexec.h> |
39 | #include <linux/mutex.h> | ||
39 | 40 | ||
40 | #include <net/ip.h> | 41 | #include <net/ip.h> |
41 | 42 | ||
@@ -99,7 +100,7 @@ static int port_name_cnt; | |||
99 | static LIST_HEAD(adapter_list); | 100 | static LIST_HEAD(adapter_list); |
100 | u64 ehea_driver_flags; | 101 | u64 ehea_driver_flags; |
101 | struct work_struct ehea_rereg_mr_task; | 102 | struct work_struct ehea_rereg_mr_task; |
102 | struct semaphore dlpar_mem_lock; | 103 | static DEFINE_MUTEX(dlpar_mem_lock); |
103 | struct ehea_fw_handle_array ehea_fw_handles; | 104 | struct ehea_fw_handle_array ehea_fw_handles; |
104 | struct ehea_bcmc_reg_array ehea_bcmc_regs; | 105 | struct ehea_bcmc_reg_array ehea_bcmc_regs; |
105 | 106 | ||
@@ -2830,7 +2831,7 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2830 | int ret, i; | 2831 | int ret, i; |
2831 | struct ehea_adapter *adapter; | 2832 | struct ehea_adapter *adapter; |
2832 | 2833 | ||
2833 | down(&dlpar_mem_lock); | 2834 | mutex_lock(&dlpar_mem_lock); |
2834 | ehea_info("LPAR memory enlarged - re-initializing driver"); | 2835 | ehea_info("LPAR memory enlarged - re-initializing driver"); |
2835 | 2836 | ||
2836 | list_for_each_entry(adapter, &adapter_list, list) | 2837 | list_for_each_entry(adapter, &adapter_list, list) |
@@ -2902,7 +2903,7 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2902 | } | 2903 | } |
2903 | } | 2904 | } |
2904 | } | 2905 | } |
2905 | up(&dlpar_mem_lock); | 2906 | mutex_unlock(&dlpar_mem_lock); |
2906 | ehea_info("re-initializing driver complete"); | 2907 | ehea_info("re-initializing driver complete"); |
2907 | out: | 2908 | out: |
2908 | return; | 2909 | return; |
@@ -3543,7 +3544,6 @@ int __init ehea_module_init(void) | |||
3543 | memset(&ehea_fw_handles, 0, sizeof(ehea_fw_handles)); | 3544 | memset(&ehea_fw_handles, 0, sizeof(ehea_fw_handles)); |
3544 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); | 3545 | memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs)); |
3545 | 3546 | ||
3546 | sema_init(&dlpar_mem_lock, 1); | ||
3547 | sema_init(&ehea_fw_handles.lock, 1); | 3547 | sema_init(&ehea_fw_handles.lock, 1); |
3548 | sema_init(&ehea_bcmc_regs.lock, 1); | 3548 | sema_init(&ehea_bcmc_regs.lock, 1); |
3549 | 3549 | ||