X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Ffirewire%2Ffw-topology.h;h=addb9f8ea776f1196dd7f65b6f75cd3695d13425;hb=178d5a742291976d13bff55fa2b130879d4510de;hp=0778077e9d800f05f52070a415d0aa7d53d68585;hpb=e175569c4639872b5cf242c9d4a71cc40c5f3c29;p=linux-2.6 diff --git a/drivers/firewire/fw-topology.h b/drivers/firewire/fw-topology.h index 0778077e9d..addb9f8ea7 100644 --- a/drivers/firewire/fw-topology.h +++ b/drivers/firewire/fw-topology.h @@ -1,7 +1,4 @@ -/* -*- c-basic-offset: 8 -*- - * - * fw-topology.h -- Incremental bus scan, based on bus topology - * +/* * Copyright (C) 2003-2006 Kristian Hoegsberg * * This program is free software; you can redistribute it and/or modify @@ -23,34 +20,24 @@ #define __fw_topology_h enum { - FW_TOPOLOGY_A = 0x01, - FW_TOPOLOGY_B = 0x02, - FW_TOPOLOGY_MIXED = 0x03, -}; - -enum { - FW_NODE_CREATED = 0x00, - FW_NODE_UPDATED = 0x01, - FW_NODE_DESTROYED = 0x02, - FW_NODE_LINK_ON = 0x03, - FW_NODE_LINK_OFF = 0x04, -}; - -struct fw_port { - struct fw_node *node; - unsigned speed : 3; /* S100, S200, ... S3200 */ + FW_NODE_CREATED, + FW_NODE_UPDATED, + FW_NODE_DESTROYED, + FW_NODE_LINK_ON, + FW_NODE_LINK_OFF, + FW_NODE_INITIATED_RESET, }; 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 : 3; /* As in the self ID packet. */ - u8 max_speed : 5; /* 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; @@ -61,15 +48,9 @@ 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); -} - static inline struct fw_node * fw_node_get(struct fw_node *node) {