aboutsummaryrefslogtreecommitdiff
path: root/drivers/firewire/fw-transaction.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-22 17:59:49 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-22 17:59:49 +0100
commit2702e0a46c2d28da92b32c9b068ee1291fc0de35 (patch)
treec1e9868a4b91beeebd5f4e820588bc2ae8371911 /drivers/firewire/fw-transaction.h
parent42bb8cc5e81028e217105299001070d57eb84ad7 (diff)
parentadfafefd104d840ee4461965f22624d77532675b (diff)
Merge branch 'linus' into timers/hpet
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r--drivers/firewire/fw-transaction.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
index c9ab12a15f6..1d78e9cc594 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -276,6 +276,15 @@ static inline void fw_card_put(struct fw_card *card)
extern void fw_schedule_bm_work(struct fw_card *card, unsigned long delay);
/*
+ * Check whether new_generation is the immediate successor of old_generation.
+ * Take counter roll-over at 255 (as per to OHCI) into account.
+ */
+static inline bool is_next_generation(int new_generation, int old_generation)
+{
+ return (new_generation & 0xff) == ((old_generation + 1) & 0xff);
+}
+
+/*
* The iso packet format allows for an immediate header/payload part
* stored in 'header' immediately after the packet info plus an
* indirect payload part that is pointer to by the 'payload' field.