Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28128
b: refs/heads/master
c: eaf8845
h: refs/heads/master
v: v3
  • Loading branch information
Ben Collins committed Jun 12, 2006
1 parent ed9c221 commit 0c8d79e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 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: 647dcb5fae0ebb5da1272ed2773df0d3f152c303
refs/heads/master: eaf88450d21fc839c3e77fa6942b8d4192bdfe53
16 changes: 8 additions & 8 deletions trunk/drivers/ieee1394/hosts.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ struct hpsb_host {

unsigned char iso_listen_count[64];

int node_count; /* number of identified nodes on this bus */
int selfid_count; /* total number of SelfIDs received */
int nodes_active; /* number of nodes with active link layer */
u8 speed[63]; /* speed between each node and local node */
int node_count; /* number of identified nodes on this bus */
int selfid_count; /* total number of SelfIDs received */
int nodes_active; /* number of nodes with active link layer */
u8 speed[ALL_NODES]; /* speed between each node and local node */

nodeid_t node_id; /* node ID of this host */
nodeid_t irm_id; /* ID of this bus' isochronous resource manager */
nodeid_t busmgr_id; /* ID of this bus' bus manager */
nodeid_t node_id; /* node ID of this host */
nodeid_t irm_id; /* ID of this bus' isochronous resource manager */
nodeid_t busmgr_id; /* ID of this bus' bus manager */

/* this nodes state */
unsigned in_bus_reset:1;
Expand All @@ -56,7 +56,7 @@ struct hpsb_host {
struct csr_control csr;

/* Per node tlabel pool allocation */
struct hpsb_tlabel_pool tpool[64];
struct hpsb_tlabel_pool tpool[ALL_NODES];

struct hpsb_host_driver *driver;

Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/ieee1394/ieee1394_transactions.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ int hpsb_get_tlabel(struct hpsb_packet *packet)
{
unsigned long flags;
struct hpsb_tlabel_pool *tp;
int n = NODEID_TO_NODE(packet->node_id);

tp = &packet->host->tpool[packet->node_id & NODE_MASK];
if (unlikely(n == ALL_NODES))
return 0;
tp = &packet->host->tpool[n];

if (irqs_disabled() || in_atomic()) {
if (down_trylock(&tp->count))
Expand Down Expand Up @@ -175,8 +178,11 @@ void hpsb_free_tlabel(struct hpsb_packet *packet)
{
unsigned long flags;
struct hpsb_tlabel_pool *tp;
int n = NODEID_TO_NODE(packet->node_id);

tp = &packet->host->tpool[packet->node_id & NODE_MASK];
if (unlikely(n == ALL_NODES))
return;
tp = &packet->host->tpool[n];

BUG_ON(packet->tlabel > 63 || packet->tlabel < 0);

Expand Down

0 comments on commit 0c8d79e

Please sign in to comment.