Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154059
b: refs/heads/master
c: 4a7eca8
h: refs/heads/master
i:
  154057: 0ae96ff
  154055: 9442858
v: v3
  • Loading branch information
Roland Dreier committed Jun 23, 2009
1 parent 4b77d6c commit e5db24b
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68237a0ff84503270373c39229be83e865ea08d4
refs/heads/master: 4a7eca824cec51168dcd5e0c9bf9edbc809fb975
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static struct notifier_block nb = {
.notifier_call = netevent_callback
};

static int addr_init(void)
static int __init addr_init(void)
{
addr_wq = create_singlethread_workqueue("ib_addr");
if (!addr_wq)
Expand All @@ -524,7 +524,7 @@ static int addr_init(void)
return 0;
}

static void addr_cleanup(void)
static void __exit addr_cleanup(void)
{
unregister_netevent_notifier(&nb);
destroy_workqueue(addr_wq);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ static void cma_remove_one(struct ib_device *device)
kfree(cma_dev);
}

static int cma_init(void)
static int __init cma_init(void)
{
int ret, low, high, remaining;

Expand Down Expand Up @@ -2990,7 +2990,7 @@ static int cma_init(void)
return ret;
}

static void cma_cleanup(void)
static void __exit cma_cleanup(void)
{
ib_unregister_client(&cma_client);
unregister_netdevice_notifier(&cma_nb);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/hw/ehca/ehca_hca.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ int ehca_query_gid(struct ib_device *ibdev, u8 port,
ib_device);
struct hipz_query_port *rblock;

if (index > 255) {
if (index < 0 || index > 255) {
ehca_err(&shca->ib_device, "Invalid index: %x.", index);
return -EINVAL;
}
Expand Down
20 changes: 16 additions & 4 deletions trunk/drivers/infiniband/hw/ehca/ehca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "ehca_tools.h"
#include "hcp_if.h"

#define HCAD_VERSION "0027"
#define HCAD_VERSION "0028"

MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>");
Expand Down Expand Up @@ -506,6 +506,7 @@ static int ehca_init_device(struct ehca_shca *shca)
shca->ib_device.detach_mcast = ehca_detach_mcast;
shca->ib_device.process_mad = ehca_process_mad;
shca->ib_device.mmap = ehca_mmap;
shca->ib_device.dma_ops = &ehca_dma_mapping_ops;

if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
shca->ib_device.uverbs_cmd_mask |=
Expand Down Expand Up @@ -1028,17 +1029,23 @@ static int __init ehca_module_init(void)
goto module_init1;
}

ret = ehca_create_busmap();
if (ret) {
ehca_gen_err("Cannot create busmap.");
goto module_init2;
}

ret = ibmebus_register_driver(&ehca_driver);
if (ret) {
ehca_gen_err("Cannot register eHCA device driver");
ret = -EINVAL;
goto module_init2;
goto module_init3;
}

ret = register_memory_notifier(&ehca_mem_nb);
if (ret) {
ehca_gen_err("Failed registering memory add/remove notifier");
goto module_init3;
goto module_init4;
}

if (ehca_poll_all_eqs != 1) {
Expand All @@ -1053,9 +1060,12 @@ static int __init ehca_module_init(void)

return 0;

module_init3:
module_init4:
ibmebus_unregister_driver(&ehca_driver);

module_init3:
ehca_destroy_busmap();

module_init2:
ehca_destroy_slab_caches();

Expand All @@ -1073,6 +1083,8 @@ static void __exit ehca_module_exit(void)

unregister_memory_notifier(&ehca_mem_nb);

ehca_destroy_busmap();

ehca_destroy_slab_caches();

ehca_destroy_comp_pool();
Expand Down
Loading

0 comments on commit e5db24b

Please sign in to comment.