aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-ohci.c')
-rw-r--r--drivers/firewire/fw-ohci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 1180d0be0bb4..1b6590f92543 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -31,6 +31,7 @@
31#include <linux/pci.h> 31#include <linux/pci.h>
32#include <linux/spinlock.h> 32#include <linux/spinlock.h>
33 33
34#include <asm/atomic.h>
34#include <asm/page.h> 35#include <asm/page.h>
35#include <asm/system.h> 36#include <asm/system.h>
36 37
@@ -178,7 +179,7 @@ struct fw_ohci {
178 int node_id; 179 int node_id;
179 int generation; 180 int generation;
180 int request_generation; /* for timestamping incoming requests */ 181 int request_generation; /* for timestamping incoming requests */
181 u32 bus_seconds; 182 atomic_t bus_seconds;
182 183
183 bool use_dualbuffer; 184 bool use_dualbuffer;
184 bool old_uninorth; 185 bool old_uninorth;
@@ -1434,7 +1435,7 @@ static irqreturn_t irq_handler(int irq, void *data)
1434 if (event & OHCI1394_cycle64Seconds) { 1435 if (event & OHCI1394_cycle64Seconds) {
1435 cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer); 1436 cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
1436 if ((cycle_time & 0x80000000) == 0) 1437 if ((cycle_time & 0x80000000) == 0)
1437 ohci->bus_seconds++; 1438 atomic_inc(&ohci->bus_seconds);
1438 } 1439 }
1439 1440
1440 return IRQ_HANDLED; 1441 return IRQ_HANDLED;
@@ -1770,7 +1771,7 @@ static u64 ohci_get_bus_time(struct fw_card *card)
1770 u64 bus_time; 1771 u64 bus_time;
1771 1772
1772 cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer); 1773 cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
1773 bus_time = ((u64) ohci->bus_seconds << 32) | cycle_time; 1774 bus_time = ((u64)atomic_read(&ohci->bus_seconds) << 32) | cycle_time;
1774 1775
1775 return bus_time; 1776 return bus_time;
1776} 1777}