diff options
-rw-r--r-- | drivers/s390/cio/chsc.c | 12 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.h | 4 | ||||
-rw-r--r-- | drivers/s390/cio/css.c | 18 |
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 4cbb1a6ca33c..f26cc3e16181 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * drivers/s390/cio/chsc.c | 2 | * drivers/s390/cio/chsc.c |
3 | * S/390 common I/O routines -- channel subsystem call | 3 | * S/390 common I/O routines -- channel subsystem call |
4 | * | 4 | * |
5 | * Copyright IBM Corp. 1999,2008 | 5 | * Copyright IBM Corp. 1999,2010 |
6 | * Author(s): Ingo Adlung (adlung@de.ibm.com) | 6 | * Author(s): Ingo Adlung (adlung@de.ibm.com) |
7 | * Cornelia Huck (cornelia.huck@de.ibm.com) | 7 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
8 | * Arnd Bergmann (arndb@de.ibm.com) | 8 | * Arnd Bergmann (arndb@de.ibm.com) |
@@ -813,7 +813,7 @@ out: | |||
813 | return ret; | 813 | return ret; |
814 | } | 814 | } |
815 | 815 | ||
816 | int __init chsc_alloc_sei_area(void) | 816 | int __init chsc_init(void) |
817 | { | 817 | { |
818 | int ret; | 818 | int ret; |
819 | 819 | ||
@@ -825,14 +825,14 @@ int __init chsc_alloc_sei_area(void) | |||
825 | } | 825 | } |
826 | ret = crw_register_handler(CRW_RSC_CSS, chsc_process_crw); | 826 | ret = crw_register_handler(CRW_RSC_CSS, chsc_process_crw); |
827 | if (ret) | 827 | if (ret) |
828 | kfree(sei_page); | 828 | free_page((unsigned long)sei_page); |
829 | return ret; | 829 | return ret; |
830 | } | 830 | } |
831 | 831 | ||
832 | void __init chsc_free_sei_area(void) | 832 | void __init chsc_init_cleanup(void) |
833 | { | 833 | { |
834 | crw_unregister_handler(CRW_RSC_CSS); | 834 | crw_unregister_handler(CRW_RSC_CSS); |
835 | kfree(sei_page); | 835 | free_page((unsigned long)sei_page); |
836 | } | 836 | } |
837 | 837 | ||
838 | int chsc_enable_facility(int operation_code) | 838 | int chsc_enable_facility(int operation_code) |
@@ -895,7 +895,7 @@ chsc_determine_css_characteristics(void) | |||
895 | struct chsc_header response; | 895 | struct chsc_header response; |
896 | u32 reserved4; | 896 | u32 reserved4; |
897 | u32 general_char[510]; | 897 | u32 general_char[510]; |
898 | u32 chsc_char[518]; | 898 | u32 chsc_char[508]; |
899 | } __attribute__ ((packed)) *scsc_area; | 899 | } __attribute__ ((packed)) *scsc_area; |
900 | 900 | ||
901 | scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); | 901 | scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index 5453013f094b..6d669dd0dd84 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -60,8 +60,8 @@ struct chsc_ssd_info { | |||
60 | extern int chsc_get_ssd_info(struct subchannel_id schid, | 60 | extern int chsc_get_ssd_info(struct subchannel_id schid, |
61 | struct chsc_ssd_info *ssd); | 61 | struct chsc_ssd_info *ssd); |
62 | extern int chsc_determine_css_characteristics(void); | 62 | extern int chsc_determine_css_characteristics(void); |
63 | extern int chsc_alloc_sei_area(void); | 63 | extern int chsc_init(void); |
64 | extern void chsc_free_sei_area(void); | 64 | extern void chsc_init_cleanup(void); |
65 | 65 | ||
66 | extern int chsc_enable_facility(int); | 66 | extern int chsc_enable_facility(int); |
67 | struct channel_subsystem; | 67 | struct channel_subsystem; |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 064d3003ed20..fa1ad3aab66f 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * driver for channel subsystem | 2 | * driver for channel subsystem |
3 | * | 3 | * |
4 | * Copyright IBM Corp. 2002, 2009 | 4 | * Copyright IBM Corp. 2002, 2010 |
5 | * | 5 | * |
6 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) | 6 | * Author(s): Arnd Bergmann (arndb@de.ibm.com) |
7 | * Cornelia Huck (cornelia.huck@de.ibm.com) | 7 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
@@ -863,14 +863,14 @@ static int __init css_bus_init(void) | |||
863 | { | 863 | { |
864 | int ret, i; | 864 | int ret, i; |
865 | 865 | ||
866 | ret = chsc_init(); | ||
867 | if (ret) | ||
868 | return ret; | ||
869 | |||
866 | ret = chsc_determine_css_characteristics(); | 870 | ret = chsc_determine_css_characteristics(); |
867 | if (ret == -ENOMEM) | 871 | if (ret == -ENOMEM) |
868 | goto out; | 872 | goto out; |
869 | 873 | ||
870 | ret = chsc_alloc_sei_area(); | ||
871 | if (ret) | ||
872 | goto out; | ||
873 | |||
874 | /* Try to enable MSS. */ | 874 | /* Try to enable MSS. */ |
875 | ret = chsc_enable_facility(CHSC_SDA_OC_MSS); | 875 | ret = chsc_enable_facility(CHSC_SDA_OC_MSS); |
876 | if (ret) | 876 | if (ret) |
@@ -956,9 +956,9 @@ out_unregister: | |||
956 | } | 956 | } |
957 | bus_unregister(&css_bus_type); | 957 | bus_unregister(&css_bus_type); |
958 | out: | 958 | out: |
959 | crw_unregister_handler(CRW_RSC_CSS); | 959 | crw_unregister_handler(CRW_RSC_SCH); |
960 | chsc_free_sei_area(); | ||
961 | idset_free(slow_subchannel_set); | 960 | idset_free(slow_subchannel_set); |
961 | chsc_init_cleanup(); | ||
962 | pr_alert("The CSS device driver initialization failed with " | 962 | pr_alert("The CSS device driver initialization failed with " |
963 | "errno=%d\n", ret); | 963 | "errno=%d\n", ret); |
964 | return ret; | 964 | return ret; |
@@ -978,9 +978,9 @@ static void __init css_bus_cleanup(void) | |||
978 | device_unregister(&css->device); | 978 | device_unregister(&css->device); |
979 | } | 979 | } |
980 | bus_unregister(&css_bus_type); | 980 | bus_unregister(&css_bus_type); |
981 | crw_unregister_handler(CRW_RSC_CSS); | 981 | crw_unregister_handler(CRW_RSC_SCH); |
982 | chsc_free_sei_area(); | ||
983 | idset_free(slow_subchannel_set); | 982 | idset_free(slow_subchannel_set); |
983 | chsc_init_cleanup(); | ||
984 | isc_unregister(IO_SCH_ISC); | 984 | isc_unregister(IO_SCH_ISC); |
985 | } | 985 | } |
986 | 986 | ||