]> err.no Git - linux-2.6/blobdiff - drivers/firewire/fw-topology.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6] / drivers / firewire / fw-topology.h
index ab03059a0da1b6b3c072de0d55d5971a958e63b3..1b56b4ac7fb2c0298830544a31fc5d4b2909d2b7 100644 (file)
@@ -1,7 +1,4 @@
-/*                                             -*- c-basic-offset: 8 -*-
- *
- * fw-topology.h -- Incremental bus scan, based on bus topology
- *
+/*
  * Copyright (C) 2003-2006 Kristian Hoegsberg <krh@bitplanet.net>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -30,22 +27,18 @@ enum {
        FW_NODE_LINK_OFF =  0x04,
 };
 
-struct fw_port {
-       struct fw_node *node;
-       unsigned speed : 3; /* S100, S200, ... S3200 */
-};
-
 struct fw_node {
        u16 node_id;
        u8 color;
        u8 port_count;
-       unsigned link_on : 1;
-       unsigned initiated_reset : 1;
-       unsigned b_path : 1;
-       u8 phy_speed; /* As in the self ID packet. */
-       u8 max_speed; /* Minimum of all phy-speeds and port speeds on
-                      * the path from the local node to this node. */
-
+       u8 link_on : 1;
+       u8 initiated_reset : 1;
+       u8 b_path : 1;
+       u8 phy_speed : 2; /* As in the self ID packet. */
+       u8 max_speed : 2; /* Minimum of all phy-speeds on the path from the
+                          * local node to this node. */
+       u8 max_depth : 4; /* Maximum depth to any leaf node */
+       u8 max_hops : 4;  /* Max hops in this sub tree */
        atomic_t ref_count;
 
        /* For serializing node topology into a list. */
@@ -54,13 +47,13 @@ struct fw_node {
        /* Upper layer specific data. */
        void *data;
 
-       struct fw_port ports[0];
+       struct fw_node *ports[0];
 };
 
 static inline struct fw_node *
 fw_node(struct list_head *l)
 {
-       return list_entry (l, struct fw_node, link);
+       return list_entry(l, struct fw_node, link);
 }
 
 static inline struct fw_node *
@@ -81,4 +74,8 @@ fw_node_put(struct fw_node *node)
 void
 fw_destroy_nodes(struct fw_card *card);
 
+int
+fw_compute_block_crc(u32 *block);
+
+
 #endif /* __fw_topology_h */