mirror of
https://github.com/torvalds/linux.git
synced 2024-10-28 07:41:44 +00:00
firewire: core: increase bus manager grace period
Per IEEE 1394 clause 8.4.2.5, bus manager capable nodes which are not incumbent shall wait at least 125ms before trying to establish themselves as bus manager. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
parent
a38a00fdef
commit
e1dc7cab43
|
@ -368,9 +368,11 @@ static void fw_card_bm_work(struct work_struct *work)
|
||||||
atomic_read(&root_device->state) == FW_DEVICE_RUNNING;
|
atomic_read(&root_device->state) == FW_DEVICE_RUNNING;
|
||||||
root_device_is_cmc = root_device && root_device->cmc;
|
root_device_is_cmc = root_device && root_device->cmc;
|
||||||
root_id = root_node->node_id;
|
root_id = root_node->node_id;
|
||||||
grace = time_after(jiffies, card->reset_jiffies + DIV_ROUND_UP(HZ, 10));
|
|
||||||
irm_device = irm_node->data;
|
irm_device = irm_node->data;
|
||||||
local_device = local_node->data;
|
local_device = local_node->data;
|
||||||
|
|
||||||
|
grace = time_after(jiffies, card->reset_jiffies + DIV_ROUND_UP(HZ, 8));
|
||||||
|
|
||||||
if (is_next_generation(generation, card->bm_generation) ||
|
if (is_next_generation(generation, card->bm_generation) ||
|
||||||
(card->bm_generation != generation && grace)) {
|
(card->bm_generation != generation && grace)) {
|
||||||
/*
|
/*
|
||||||
|
@ -434,12 +436,11 @@ static void fw_card_bm_work(struct work_struct *work)
|
||||||
}
|
}
|
||||||
} else if (card->bm_generation != generation) {
|
} else if (card->bm_generation != generation) {
|
||||||
/*
|
/*
|
||||||
* OK, we weren't BM in the last generation, and it's
|
* We weren't BM in the last generation, and the last
|
||||||
* less than 100ms since last bus reset. Reschedule
|
* bus reset is less than 125ms ago. Reschedule this job.
|
||||||
* this task 100ms from now.
|
|
||||||
*/
|
*/
|
||||||
spin_unlock_irqrestore(&card->lock, flags);
|
spin_unlock_irqrestore(&card->lock, flags);
|
||||||
fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 10));
|
fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user