Commit cdfac186 authored by Ben Collins's avatar Ben Collins

[IEEE1394]: Re-add init_hpsb_highlevel() call to highlevel_add_host.

parent f97af064
......@@ -251,13 +251,13 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl)
list_add_tail(&hl->hl_list, &hl_drivers);
up_write(&hl_drivers_sem);
if (hl->add_host)
nodemgr_for_each_host(hl, highlevel_for_each_host_reg);
write_lock(&hl_irqs_lock);
list_add_tail(&hl->irq_list, &hl_irqs);
write_unlock(&hl_irqs_lock);
if (hl->add_host)
nodemgr_for_each_host(hl, highlevel_for_each_host_reg);
return;
}
......@@ -402,11 +402,28 @@ void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host,
}
}
static void init_hpsb_highlevel(struct hpsb_host *host)
{
INIT_LIST_HEAD(&dummy_zero_addr.as_list);
INIT_LIST_HEAD(&dummy_zero_addr.addr_list);
INIT_LIST_HEAD(&dummy_max_addr.as_list);
INIT_LIST_HEAD(&dummy_max_addr.addr_list);
dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops;
dummy_zero_addr.start = dummy_zero_addr.end = 0;
dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48;
list_add_tail(&dummy_zero_addr.as_list, &host->addr_space);
list_add_tail(&dummy_max_addr.as_list, &host->addr_space);
}
void highlevel_add_host(struct hpsb_host *host)
{
struct hpsb_highlevel *hl;
init_hpsb_highlevel(host);
down_read(&hl_drivers_sem);
list_for_each_entry(hl, &hl_drivers, hl_list) {
if (hl->add_host)
......@@ -642,19 +659,3 @@ int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store,
return rcode;
}
void init_hpsb_highlevel(struct hpsb_host *host)
{
INIT_LIST_HEAD(&dummy_zero_addr.as_list);
INIT_LIST_HEAD(&dummy_zero_addr.addr_list);
INIT_LIST_HEAD(&dummy_max_addr.as_list);
INIT_LIST_HEAD(&dummy_max_addr.addr_list);
dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops;
dummy_zero_addr.start = dummy_zero_addr.end = 0;
dummy_max_addr.start = dummy_max_addr.end = ((u64) 1) << 48;
list_add_tail(&dummy_zero_addr.as_list, &host->addr_space);
list_add_tail(&dummy_max_addr.as_list, &host->addr_space);
}
......@@ -182,7 +182,4 @@ int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *d
/* Retrieve hpsb_host using a highlevel handle and a key */
struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key);
/* Initialize the highlevel system */
void init_hpsb_highlevel(struct hpsb_host *host);
#endif /* IEEE1394_HIGHLEVEL_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment