Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119497
b: refs/heads/master
c: e47c1fe
h: refs/heads/master
i:
  119495: 266a978
v: v3
  • Loading branch information
Stefan Richter committed Nov 29, 2008
1 parent 2a22ead commit d42c7e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 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: 031bb27c4bf77c2f60b3f3dea8cce63ef0d1fba9
refs/heads/master: e47c1feb17e61ef4e2f245c0af0c5a8e2a7798b2
25 changes: 12 additions & 13 deletions trunk/drivers/ieee1394/highlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ static DEFINE_RWLOCK(hl_irqs_lock);

static DEFINE_RWLOCK(addr_space_lock);

/* addr_space list will have zero and max already included as bounds */
static struct hpsb_address_ops dummy_ops = { NULL, NULL, NULL, NULL };
static struct hpsb_address_serve dummy_zero_addr, dummy_max_addr;


static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl,
struct hpsb_host *host)
Expand Down Expand Up @@ -481,20 +477,23 @@ int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host,
return retval;
}

static struct hpsb_address_ops dummy_ops;

/* dummy address spaces as lower and upper bounds of the host's a.s. list */
static void init_hpsb_highlevel(struct hpsb_host *host)
{
INIT_LIST_HEAD(&dummy_zero_addr.host_list);
INIT_LIST_HEAD(&dummy_zero_addr.hl_list);
INIT_LIST_HEAD(&dummy_max_addr.host_list);
INIT_LIST_HEAD(&dummy_max_addr.hl_list);
INIT_LIST_HEAD(&host->dummy_zero_addr.host_list);
INIT_LIST_HEAD(&host->dummy_zero_addr.hl_list);
INIT_LIST_HEAD(&host->dummy_max_addr.host_list);
INIT_LIST_HEAD(&host->dummy_max_addr.hl_list);

dummy_zero_addr.op = dummy_max_addr.op = &dummy_ops;
host->dummy_zero_addr.op = host->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;
host->dummy_zero_addr.start = host->dummy_zero_addr.end = 0;
host->dummy_max_addr.start = host->dummy_max_addr.end = ((u64) 1) << 48;

list_add_tail(&dummy_zero_addr.host_list, &host->addr_space);
list_add_tail(&dummy_max_addr.host_list, &host->addr_space);
list_add_tail(&host->dummy_zero_addr.host_list, &host->addr_space);
list_add_tail(&host->dummy_max_addr.host_list, &host->addr_space);
}

void highlevel_add_host(struct hpsb_host *host)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/ieee1394/hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct module;

#include "ieee1394_types.h"
#include "csr.h"
#include "highlevel.h"

struct hpsb_packet;
struct hpsb_iso;
Expand Down Expand Up @@ -72,6 +73,9 @@ struct hpsb_host {
struct { DECLARE_BITMAP(map, 64); } tl_pool[ALL_NODES];

struct csr_control csr;

struct hpsb_address_serve dummy_zero_addr;
struct hpsb_address_serve dummy_max_addr;
};

enum devctl_cmd {
Expand Down

0 comments on commit d42c7e7

Please sign in to comment.