Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89646
b: refs/heads/master
c: 25b1c3d
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent f7f7bad commit 78c124a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 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: 2a0a2590498be7b92e3e76409c9b8ee722e23c8f
refs/heads/master: 25b1c3d8889f982ebc6c7b996cfc7fa5f1dce533
8 changes: 4 additions & 4 deletions trunk/drivers/firewire/fw-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fw_card_bm_work(struct work_struct *work)
struct bm_data bmd;
unsigned long flags;
int root_id, new_root_id, irm_id, gap_count, generation, grace;
int do_reset = 0;
bool do_reset = false;

spin_lock_irqsave(&card->lock, flags);
local_node = card->local_node;
Expand Down Expand Up @@ -360,14 +360,14 @@ fw_card_bm_work(struct work_struct *work)
gap_count = 63;

/*
* Finally, figure out if we should do a reset or not. If we've
* done less that 5 resets with the same physical topology and we
* Finally, figure out if we should do a reset or not. If we have
* done less than 5 resets with the same physical topology and we
* have either a new root or a new gap count setting, let's do it.
*/

if (card->bm_retries++ < 5 &&
(card->gap_count != gap_count || new_root_id != root_id))
do_reset = 1;
do_reset = true;

spin_unlock_irqrestore(&card->lock, flags);

Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/firewire/fw-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,11 @@ static struct fw_node *build_tree(struct fw_card *card,
beta_repeaters_present = true;

/*
* If all PHYs does not report the same gap count
* setting, we fall back to 63 which will force a gap
* count reconfiguration and a reset.
* If PHYs report different gap counts, set an invalid count
* which will force a gap count reconfiguration and a reset.
*/
if (SELF_ID_GAP_COUNT(q) != gap_count)
gap_count = 63;
gap_count = 0;

update_hop_count(node);

Expand Down

0 comments on commit 78c124a

Please sign in to comment.