diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index b70c5314f537..422fcb93e2c3 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2863,7 +2863,7 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2863 | struct ehea_adapter *adapter; | 2863 | struct ehea_adapter *adapter; |
2864 | 2864 | ||
2865 | mutex_lock(&dlpar_mem_lock); | 2865 | mutex_lock(&dlpar_mem_lock); |
2866 | ehea_info("LPAR memory enlarged - re-initializing driver"); | 2866 | ehea_info("LPAR memory changed - re-initializing driver"); |
2867 | 2867 | ||
2868 | list_for_each_entry(adapter, &adapter_list, list) | 2868 | list_for_each_entry(adapter, &adapter_list, list) |
2869 | if (adapter->active_ports) { | 2869 | if (adapter->active_ports) { |
@@ -2900,13 +2900,6 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2900 | } | 2900 | } |
2901 | } | 2901 | } |
2902 | 2902 | ||
2903 | ehea_destroy_busmap(); | ||
2904 | ret = ehea_create_busmap(); | ||
2905 | if (ret) { | ||
2906 | ehea_error("creating ehea busmap failed"); | ||
2907 | goto out; | ||
2908 | } | ||
2909 | |||
2910 | clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags); | 2903 | clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags); |
2911 | 2904 | ||
2912 | list_for_each_entry(adapter, &adapter_list, list) | 2905 | list_for_each_entry(adapter, &adapter_list, list) |
@@ -3519,9 +3512,21 @@ void ehea_crash_handler(void) | |||
3519 | static int ehea_mem_notifier(struct notifier_block *nb, | 3512 | static int ehea_mem_notifier(struct notifier_block *nb, |
3520 | unsigned long action, void *data) | 3513 | unsigned long action, void *data) |
3521 | { | 3514 | { |
3515 | struct memory_notify *arg = data; | ||
3522 | switch (action) { | 3516 | switch (action) { |
3523 | case MEM_OFFLINE: | 3517 | case MEM_CANCEL_OFFLINE: |
3524 | ehea_info("memory has been removed"); | 3518 | ehea_info("memory offlining canceled"); |
3519 | /* Readd canceled memory block */ | ||
3520 | case MEM_ONLINE: | ||
3521 | ehea_info("memory is going online"); | ||
3522 | if (ehea_add_sect_bmap(arg->start_pfn, arg->nr_pages)) | ||
3523 | return NOTIFY_BAD; | ||
3524 | ehea_rereg_mrs(NULL); | ||
3525 | break; | ||
3526 | case MEM_GOING_OFFLINE: | ||
3527 | ehea_info("memory is going offline"); | ||
3528 | if (ehea_rem_sect_bmap(arg->start_pfn, arg->nr_pages)) | ||
3529 | return NOTIFY_BAD; | ||
3525 | ehea_rereg_mrs(NULL); | 3530 | ehea_rereg_mrs(NULL); |
3526 | break; | 3531 | break; |
3527 | default: | 3532 | default: |