Merge branch 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6
[sfrench/cifs-2.6.git] / drivers / firewire / fw-transaction.h
index acdc3be38c613af6ba6a6a4a0eae5921ac1cca3a..09cb72870454ea72ceee81f5139c3460665d9ae8 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/fs.h>
 #include <linux/dma-mapping.h>
 #include <linux/firewire-constants.h>
+#include <asm/atomic.h>
 
 #define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
 #define TCODE_IS_BLOCK_PACKET(tcode)   (((tcode) &  1) != 0)
@@ -81,7 +82,6 @@
 
 #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args)
 #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args)
-#define fw_debug(s, args...) printk(KERN_DEBUG KBUILD_MODNAME ": " s, ## args)
 
 static inline void
 fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
@@ -124,6 +124,10 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
                                          size_t length,
                                          void *callback_data);
 
+/*
+ * Important note:  The callback must guarantee that either fw_send_response()
+ * or kfree() is called on the @request.
+ */
 typedef void (*fw_address_callback_t)(struct fw_card *card,
                                      struct fw_request *request,
                                      int tcode, int destination, int source,
@@ -216,6 +220,7 @@ 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;
 
        int node_id;
@@ -228,7 +233,7 @@ struct fw_card {
        unsigned long reset_jiffies;
 
        unsigned long long guid;
-       int max_receive;
+       unsigned max_receive;
        int link_speed;
        int config_rom_generation;
 
@@ -246,7 +251,7 @@ struct fw_card {
        struct fw_node *irm_node;
        int color;
        int gap_count;
-       int topology_type;
+       bool beta_repeaters_present;
 
        int index;