aboutsummaryrefslogtreecommitdiff
path: root/drivers/firewire/core-topology.c
diff options
context:
space:
mode:
authorClemens Ladisch2011-01-22 15:05:03 +0100
committerStefan Richter2011-01-23 12:31:01 +0100
commite71084af58cf15e6043338500eeaf6281d0a62af (patch)
treed757d4891a4f93f7a07c1f12448d3be3be748fa1 /drivers/firewire/core-topology.c
parentdbc9880fa731fe2482a706bbabb4165269233063 (diff)
firewire: core: fix card->reset_jiffies overflow
On a 32-bit machine with, e.g., HZ=1000, jiffies will overflow after about 50 days, so if there are between 25 and 50 days between bus resets, the card->reset_jiffies comparisons can get wrong results. To fix this, ensure that this timestamp always uses 64 bits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core-topology.c')
-rw-r--r--drivers/firewire/core-topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index 09be1a635505..193ed9233144 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -545,7 +545,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
*/
smp_wmb();
card->generation = generation;
- card->reset_jiffies = jiffies;
+ card->reset_jiffies = get_jiffies_64();
card->bm_node_id = 0xffff;
card->bm_abdicate = bm_abdicate;
fw_schedule_bm_work(card, 0);