firewire: reorder struct fw_card for better cache efficiency
[sfrench/cifs-2.6.git] / drivers / firewire / fw-transaction.h
index 027f58ce81ad124a03b630071cd94dc1d4579348..c9ab12a15f6eb2974fd65e9b98b3e41d3c72faa0 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/list.h>
 #include <linux/spinlock_types.h>
 #include <linux/timer.h>
+#include <linux/types.h>
 #include <linux/workqueue.h>
 
 #define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
@@ -153,6 +154,7 @@ struct fw_packet {
        size_t header_length;
        void *payload;
        size_t payload_length;
+       dma_addr_t payload_bus;
        u32 timestamp;
 
        /*
@@ -235,20 +237,12 @@ struct fw_card {
        int link_speed;
        int config_rom_generation;
 
-       /*
-        * We need to store up to 4 self ID for a maximum of 63
-        * devices plus 3 words for the topology map header.
-        */
-       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. */
        struct fw_node *local_node;
        struct fw_node *root_node;
        struct fw_node *irm_node;
-       int color;
+       u8 color; /* must be u8 to match the definition in struct fw_node */
        int gap_count;
        bool beta_repeaters_present;
 
@@ -260,6 +254,9 @@ struct fw_card {
        struct delayed_work work;
        int bm_retries;
        int bm_generation;
+
+       u32 broadcast_channel;
+       u32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
 };
 
 static inline struct fw_card *fw_card_get(struct fw_card *card)
@@ -276,6 +273,8 @@ static inline void fw_card_put(struct fw_card *card)
        kref_put(&card->kref, fw_card_release);
 }
 
+extern void fw_schedule_bm_work(struct fw_card *card, unsigned long delay);
+
 /*
  * The iso packet format allows for an immediate header/payload part
  * stored in 'header' immediately after the packet info plus an