aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/ieee1394_transactions.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/ieee1394_transactions.c')
-rw-r--r--drivers/ieee1394/ieee1394_transactions.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c
index 3fe2f6c4a253..a114b91d606d 100644
--- a/drivers/ieee1394/ieee1394_transactions.c
+++ b/drivers/ieee1394/ieee1394_transactions.c
@@ -136,8 +136,11 @@ int hpsb_get_tlabel(struct hpsb_packet *packet)
136{ 136{
137 unsigned long flags; 137 unsigned long flags;
138 struct hpsb_tlabel_pool *tp; 138 struct hpsb_tlabel_pool *tp;
139 int n = NODEID_TO_NODE(packet->node_id);
139 140
140 tp = &packet->host->tpool[packet->node_id & NODE_MASK]; 141 if (unlikely(n == ALL_NODES))
142 return 0;
143 tp = &packet->host->tpool[n];
141 144
142 if (irqs_disabled() || in_atomic()) { 145 if (irqs_disabled() || in_atomic()) {
143 if (down_trylock(&tp->count)) 146 if (down_trylock(&tp->count))
@@ -175,8 +178,11 @@ void hpsb_free_tlabel(struct hpsb_packet *packet)
175{ 178{
176 unsigned long flags; 179 unsigned long flags;
177 struct hpsb_tlabel_pool *tp; 180 struct hpsb_tlabel_pool *tp;
181 int n = NODEID_TO_NODE(packet->node_id);
178 182
179 tp = &packet->host->tpool[packet->node_id & NODE_MASK]; 183 if (unlikely(n == ALL_NODES))
184 return;
185 tp = &packet->host->tpool[n];
180 186
181 BUG_ON(packet->tlabel > 63 || packet->tlabel < 0); 187 BUG_ON(packet->tlabel > 63 || packet->tlabel < 0);
182 188