diff options
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index ce4e6eff4792..fab18a2c74a8 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include "ehca_tools.h" | 52 | #include "ehca_tools.h" |
53 | #include "hcp_if.h" | 53 | #include "hcp_if.h" |
54 | 54 | ||
55 | #define HCAD_VERSION "0027" | 55 | #define HCAD_VERSION "0028" |
56 | 56 | ||
57 | MODULE_LICENSE("Dual BSD/GPL"); | 57 | MODULE_LICENSE("Dual BSD/GPL"); |
58 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); | 58 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); |
@@ -506,6 +506,7 @@ static int ehca_init_device(struct ehca_shca *shca) | |||
506 | shca->ib_device.detach_mcast = ehca_detach_mcast; | 506 | shca->ib_device.detach_mcast = ehca_detach_mcast; |
507 | shca->ib_device.process_mad = ehca_process_mad; | 507 | shca->ib_device.process_mad = ehca_process_mad; |
508 | shca->ib_device.mmap = ehca_mmap; | 508 | shca->ib_device.mmap = ehca_mmap; |
509 | shca->ib_device.dma_ops = &ehca_dma_mapping_ops; | ||
509 | 510 | ||
510 | if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) { | 511 | if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) { |
511 | shca->ib_device.uverbs_cmd_mask |= | 512 | shca->ib_device.uverbs_cmd_mask |= |
@@ -1028,17 +1029,23 @@ static int __init ehca_module_init(void) | |||
1028 | goto module_init1; | 1029 | goto module_init1; |
1029 | } | 1030 | } |
1030 | 1031 | ||
1032 | ret = ehca_create_busmap(); | ||
1033 | if (ret) { | ||
1034 | ehca_gen_err("Cannot create busmap."); | ||
1035 | goto module_init2; | ||
1036 | } | ||
1037 | |||
1031 | ret = ibmebus_register_driver(&ehca_driver); | 1038 | ret = ibmebus_register_driver(&ehca_driver); |
1032 | if (ret) { | 1039 | if (ret) { |
1033 | ehca_gen_err("Cannot register eHCA device driver"); | 1040 | ehca_gen_err("Cannot register eHCA device driver"); |
1034 | ret = -EINVAL; | 1041 | ret = -EINVAL; |
1035 | goto module_init2; | 1042 | goto module_init3; |
1036 | } | 1043 | } |
1037 | 1044 | ||
1038 | ret = register_memory_notifier(&ehca_mem_nb); | 1045 | ret = register_memory_notifier(&ehca_mem_nb); |
1039 | if (ret) { | 1046 | if (ret) { |
1040 | ehca_gen_err("Failed registering memory add/remove notifier"); | 1047 | ehca_gen_err("Failed registering memory add/remove notifier"); |
1041 | goto module_init3; | 1048 | goto module_init4; |
1042 | } | 1049 | } |
1043 | 1050 | ||
1044 | if (ehca_poll_all_eqs != 1) { | 1051 | if (ehca_poll_all_eqs != 1) { |
@@ -1053,9 +1060,12 @@ static int __init ehca_module_init(void) | |||
1053 | 1060 | ||
1054 | return 0; | 1061 | return 0; |
1055 | 1062 | ||
1056 | module_init3: | 1063 | module_init4: |
1057 | ibmebus_unregister_driver(&ehca_driver); | 1064 | ibmebus_unregister_driver(&ehca_driver); |
1058 | 1065 | ||
1066 | module_init3: | ||
1067 | ehca_destroy_busmap(); | ||
1068 | |||
1059 | module_init2: | 1069 | module_init2: |
1060 | ehca_destroy_slab_caches(); | 1070 | ehca_destroy_slab_caches(); |
1061 | 1071 | ||
@@ -1073,6 +1083,8 @@ static void __exit ehca_module_exit(void) | |||
1073 | 1083 | ||
1074 | unregister_memory_notifier(&ehca_mem_nb); | 1084 | unregister_memory_notifier(&ehca_mem_nb); |
1075 | 1085 | ||
1086 | ehca_destroy_busmap(); | ||
1087 | |||
1076 | ehca_destroy_slab_caches(); | 1088 | ehca_destroy_slab_caches(); |
1077 | 1089 | ||
1078 | ehca_destroy_comp_pool(); | 1090 | ehca_destroy_comp_pool(); |