X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Ffirewire%2Ffw-transaction.h;h=2ae1b0d6cb7bdfaa6929ccc06a00d63501acebcf;hb=849c529f57020cc47085400edd5e641d95cd4faf;hp=a43bb22912f9da9488fd83a2060b80c78bdfe55b;hpb=6f58d79598c184dc4f18ceddfaa5fa7483bce0a5;p=pandora-kernel.git diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index a43bb22912f9..2ae1b0d6cb7b 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h @@ -19,14 +19,15 @@ #ifndef __fw_transaction_h #define __fw_transaction_h +#include #include -#include -#include -#include -#include #include #include -#include +#include +#include +#include +#include +#include #define TCODE_IS_READ_REQUEST(tcode) (((tcode) & ~1) == 4) #define TCODE_IS_BLOCK_PACKET(tcode) (((tcode) & 1) != 0) @@ -80,6 +81,9 @@ #define CSR_SPEED_MAP 0x2000 #define CSR_SPEED_MAP_END 0x3000 +#define BROADCAST_CHANNEL_INITIAL (1 << 31 | 31) +#define BROADCAST_CHANNEL_VALID (1 << 30) + #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) @@ -201,11 +205,7 @@ struct fw_address_region { u64 end; }; -extern const struct fw_address_region fw_low_memory_region; extern const struct fw_address_region fw_high_memory_region; -extern const struct fw_address_region fw_private_region; -extern const struct fw_address_region fw_csr_region; -extern const struct fw_address_region fw_unit_space_region; int fw_core_add_address_handler(struct fw_address_handler *handler, const struct fw_address_region *region); @@ -220,13 +220,11 @@ extern struct bus_type fw_bus_type; struct fw_card { const struct fw_card_driver *driver; struct device *device; - atomic_t device_count; struct kref kref; + struct completion done; int node_id; int generation; - /* This is the generation used for timestamping incoming requests. */ - int request_generation; int current_tlabel, tlabel_mask; struct list_head transaction_list; struct timer_list flush_timer; @@ -243,6 +241,7 @@ struct fw_card { */ int self_id_count; u32 topology_map[252 + 3]; + u32 broadcast_channel; spinlock_t lock; /* Take this lock when handling the lists in * this struct. */ @@ -263,8 +262,19 @@ struct fw_card { int bm_generation; }; -struct fw_card *fw_card_get(struct fw_card *card); -void fw_card_put(struct fw_card *card); +static inline struct fw_card *fw_card_get(struct fw_card *card) +{ + kref_get(&card->kref); + + return card; +} + +void fw_card_release(struct kref *kref); + +static inline void fw_card_put(struct fw_card *card) +{ + kref_put(&card->kref, fw_card_release); +} /* * The iso packet format allows for an immediate header/payload part @@ -358,8 +368,6 @@ int fw_iso_context_stop(struct fw_iso_context *ctx); struct fw_card_driver { - const char *name; - /* * Enable the given card with the given initial config rom. * This function is expected to activate the card, and either