diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-05-07 20:33:35 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-05-10 12:24:13 -0400 |
commit | a77754a75d58d534fd34a5add8ac1bb91d4ffc0f (patch) | |
tree | 773885568a19a8ed354acba1bf5c1d5a63a828d1 /drivers/firewire/fw-topology.c | |
parent | a98e27198771d066934a263177673ebde797e8fb (diff) |
firewire: Uppercase most macro names.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r-- | drivers/firewire/fw-topology.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index 490490205ea9..b9dce70b3aed 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c | |||
@@ -24,16 +24,16 @@ | |||
24 | #include "fw-transaction.h" | 24 | #include "fw-transaction.h" |
25 | #include "fw-topology.h" | 25 | #include "fw-topology.h" |
26 | 26 | ||
27 | #define self_id_phy_id(q) (((q) >> 24) & 0x3f) | 27 | #define SELF_ID_PHY_ID(q) (((q) >> 24) & 0x3f) |
28 | #define self_id_extended(q) (((q) >> 23) & 0x01) | 28 | #define SELF_ID_EXTENDED(q) (((q) >> 23) & 0x01) |
29 | #define self_id_link_on(q) (((q) >> 22) & 0x01) | 29 | #define SELF_ID_LINK_ON(q) (((q) >> 22) & 0x01) |
30 | #define self_id_gap_count(q) (((q) >> 16) & 0x3f) | 30 | #define SELF_ID_GAP_COUNT(q) (((q) >> 16) & 0x3f) |
31 | #define self_id_phy_speed(q) (((q) >> 14) & 0x03) | 31 | #define SELF_ID_PHY_SPEED(q) (((q) >> 14) & 0x03) |
32 | #define self_id_contender(q) (((q) >> 11) & 0x01) | 32 | #define SELF_ID_CONTENDER(q) (((q) >> 11) & 0x01) |
33 | #define self_id_phy_initiator(q) (((q) >> 1) & 0x01) | 33 | #define SELF_ID_PHY_INITIATOR(q) (((q) >> 1) & 0x01) |
34 | #define self_id_more_packets(q) (((q) >> 0) & 0x01) | 34 | #define SELF_ID_MORE_PACKETS(q) (((q) >> 0) & 0x01) |
35 | 35 | ||
36 | #define self_id_ext_sequence(q) (((q) >> 20) & 0x07) | 36 | #define SELF_ID_EXT_SEQUENCE(q) (((q) >> 20) & 0x07) |
37 | 37 | ||
38 | static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count) | 38 | static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count) |
39 | { | 39 | { |
@@ -61,7 +61,7 @@ static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count) | |||
61 | 61 | ||
62 | shift -= 2; | 62 | shift -= 2; |
63 | if (shift == 0) { | 63 | if (shift == 0) { |
64 | if (!self_id_more_packets(q)) | 64 | if (!SELF_ID_MORE_PACKETS(q)) |
65 | return sid + 1; | 65 | return sid + 1; |
66 | 66 | ||
67 | shift = 16; | 67 | shift = 16; |
@@ -75,8 +75,8 @@ static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count) | |||
75 | * packets increase as expected. | 75 | * packets increase as expected. |
76 | */ | 76 | */ |
77 | 77 | ||
78 | if (!self_id_extended(q) || | 78 | if (!SELF_ID_EXTENDED(q) || |
79 | seq != self_id_ext_sequence(q)) | 79 | seq != SELF_ID_EXT_SEQUENCE(q)) |
80 | return NULL; | 80 | return NULL; |
81 | 81 | ||
82 | seq++; | 82 | seq++; |
@@ -103,9 +103,9 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color) | |||
103 | return NULL; | 103 | return NULL; |
104 | 104 | ||
105 | node->color = color; | 105 | node->color = color; |
106 | node->node_id = LOCAL_BUS | self_id_phy_id(sid); | 106 | node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid); |
107 | node->link_on = self_id_link_on(sid); | 107 | node->link_on = SELF_ID_LINK_ON(sid); |
108 | node->phy_speed = self_id_phy_speed(sid); | 108 | node->phy_speed = SELF_ID_PHY_SPEED(sid); |
109 | node->port_count = port_count; | 109 | node->port_count = port_count; |
110 | 110 | ||
111 | atomic_set(&node->ref_count, 1); | 111 | atomic_set(&node->ref_count, 1); |
@@ -181,7 +181,7 @@ static struct fw_node *build_tree(struct fw_card *card, | |||
181 | end = sid + self_id_count; | 181 | end = sid + self_id_count; |
182 | phy_id = 0; | 182 | phy_id = 0; |
183 | irm_node = NULL; | 183 | irm_node = NULL; |
184 | gap_count = self_id_gap_count(*sid); | 184 | gap_count = SELF_ID_GAP_COUNT(*sid); |
185 | topology_type = 0; | 185 | topology_type = 0; |
186 | 186 | ||
187 | while (sid < end) { | 187 | while (sid < end) { |
@@ -193,9 +193,9 @@ static struct fw_node *build_tree(struct fw_card *card, | |||
193 | } | 193 | } |
194 | 194 | ||
195 | q = *sid; | 195 | q = *sid; |
196 | if (phy_id != self_id_phy_id(q)) { | 196 | if (phy_id != SELF_ID_PHY_ID(q)) { |
197 | fw_error("PHY ID mismatch in self ID: %d != %d.\n", | 197 | fw_error("PHY ID mismatch in self ID: %d != %d.\n", |
198 | phy_id, self_id_phy_id(q)); | 198 | phy_id, SELF_ID_PHY_ID(q)); |
199 | return NULL; | 199 | return NULL; |
200 | } | 200 | } |
201 | 201 | ||
@@ -221,7 +221,7 @@ static struct fw_node *build_tree(struct fw_card *card, | |||
221 | if (phy_id == (card->node_id & 0x3f)) | 221 | if (phy_id == (card->node_id & 0x3f)) |
222 | local_node = node; | 222 | local_node = node; |
223 | 223 | ||
224 | if (self_id_contender(q)) | 224 | if (SELF_ID_CONTENDER(q)) |
225 | irm_node = node; | 225 | irm_node = node; |
226 | 226 | ||
227 | if (node->phy_speed == SCODE_BETA) | 227 | if (node->phy_speed == SCODE_BETA) |
@@ -283,7 +283,7 @@ static struct fw_node *build_tree(struct fw_card *card, | |||
283 | * setting, we fall back to 63 which will force a gap | 283 | * setting, we fall back to 63 which will force a gap |
284 | * count reconfiguration and a reset. | 284 | * count reconfiguration and a reset. |
285 | */ | 285 | */ |
286 | if (self_id_gap_count(q) != gap_count) | 286 | if (SELF_ID_GAP_COUNT(q) != gap_count) |
287 | gap_count = 63; | 287 | gap_count = 63; |
288 | 288 | ||
289 | update_hop_count(node); | 289 | update_hop_count(node); |