aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/fw-card.c8
-rw-r--r--drivers/firewire/fw-topology.c7
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 7e4012db6ad2..681bb8d4ef63 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -220,7 +220,7 @@ fw_card_bm_work(struct work_struct *work)
220 struct bm_data bmd; 220 struct bm_data bmd;
221 unsigned long flags; 221 unsigned long flags;
222 int root_id, new_root_id, irm_id, gap_count, generation, grace; 222 int root_id, new_root_id, irm_id, gap_count, generation, grace;
223 int do_reset = 0; 223 bool do_reset = false;
224 224
225 spin_lock_irqsave(&card->lock, flags); 225 spin_lock_irqsave(&card->lock, flags);
226 local_node = card->local_node; 226 local_node = card->local_node;
@@ -360,14 +360,14 @@ fw_card_bm_work(struct work_struct *work)
360 gap_count = 63; 360 gap_count = 63;
361 361
362 /* 362 /*
363 * Finally, figure out if we should do a reset or not. If we've 363 * Finally, figure out if we should do a reset or not. If we have
364 * done less that 5 resets with the same physical topology and we 364 * done less than 5 resets with the same physical topology and we
365 * have either a new root or a new gap count setting, let's do it. 365 * have either a new root or a new gap count setting, let's do it.
366 */ 366 */
367 367
368 if (card->bm_retries++ < 5 && 368 if (card->bm_retries++ < 5 &&
369 (card->gap_count != gap_count || new_root_id != root_id)) 369 (card->gap_count != gap_count || new_root_id != root_id))
370 do_reset = 1; 370 do_reset = true;
371 371
372 spin_unlock_irqrestore(&card->lock, flags); 372 spin_unlock_irqrestore(&card->lock, flags);
373 373
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index ebdec4c6c689..213b0ff8f3d6 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -290,12 +290,11 @@ static struct fw_node *build_tree(struct fw_card *card,
290 beta_repeaters_present = true; 290 beta_repeaters_present = true;
291 291
292 /* 292 /*
293 * If all PHYs does not report the same gap count 293 * If PHYs report different gap counts, set an invalid count
294 * setting, we fall back to 63 which will force a gap 294 * which will force a gap count reconfiguration and a reset.
295 * count reconfiguration and a reset.
296 */ 295 */
297 if (SELF_ID_GAP_COUNT(q) != gap_count) 296 if (SELF_ID_GAP_COUNT(q) != gap_count)
298 gap_count = 63; 297 gap_count = 0;
299 298
300 update_hop_count(node); 299 update_hop_count(node);
301 300