aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firewire/nosy-dump.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firewire/nosy-dump.h')
-rw-r--r--tools/firewire/nosy-dump.h280
1 files changed, 140 insertions, 140 deletions
diff --git a/tools/firewire/nosy-dump.h b/tools/firewire/nosy-dump.h
index 60cf556e228e..fe8be630efaa 100644
--- a/tools/firewire/nosy-dump.h
+++ b/tools/firewire/nosy-dump.h
@@ -36,60 +36,60 @@
36#include <stdint.h> 36#include <stdint.h>
37 37
38struct phy_packet { 38struct phy_packet {
39 uint32_t timestamp; 39 uint32_t timestamp;
40 union { 40 union {
41 struct { 41 struct {
42 uint32_t zero:24; 42 uint32_t zero:24;
43 uint32_t phy_id:6; 43 uint32_t phy_id:6;
44 uint32_t identifier:2; 44 uint32_t identifier:2;
45 } common, link_on; 45 } common, link_on;
46 46
47 struct { 47 struct {
48 uint32_t zero:16; 48 uint32_t zero:16;
49 uint32_t gap_count:6; 49 uint32_t gap_count:6;
50 uint32_t set_gap_count:1; 50 uint32_t set_gap_count:1;
51 uint32_t set_root:1; 51 uint32_t set_root:1;
52 uint32_t root_id:6; 52 uint32_t root_id:6;
53 uint32_t identifier:2; 53 uint32_t identifier:2;
54 } phy_config; 54 } phy_config;
55 55
56 struct { 56 struct {
57 uint32_t more_packets:1; 57 uint32_t more_packets:1;
58 uint32_t initiated_reset:1; 58 uint32_t initiated_reset:1;
59 uint32_t port2:2; 59 uint32_t port2:2;
60 uint32_t port1:2; 60 uint32_t port1:2;
61 uint32_t port0:2; 61 uint32_t port0:2;
62 uint32_t power_class:3; 62 uint32_t power_class:3;
63 uint32_t contender:1; 63 uint32_t contender:1;
64 uint32_t phy_delay:2; 64 uint32_t phy_delay:2;
65 uint32_t phy_speed:2; 65 uint32_t phy_speed:2;
66 uint32_t gap_count:6; 66 uint32_t gap_count:6;
67 uint32_t link_active:1; 67 uint32_t link_active:1;
68 uint32_t extended:1; 68 uint32_t extended:1;
69 uint32_t phy_id:6; 69 uint32_t phy_id:6;
70 uint32_t identifier:2; 70 uint32_t identifier:2;
71 } self_id; 71 } self_id;
72 72
73 struct { 73 struct {
74 uint32_t more_packets:1; 74 uint32_t more_packets:1;
75 uint32_t reserved1:1; 75 uint32_t reserved1:1;
76 uint32_t porth:2; 76 uint32_t porth:2;
77 uint32_t portg:2; 77 uint32_t portg:2;
78 uint32_t portf:2; 78 uint32_t portf:2;
79 uint32_t porte:2; 79 uint32_t porte:2;
80 uint32_t portd:2; 80 uint32_t portd:2;
81 uint32_t portc:2; 81 uint32_t portc:2;
82 uint32_t portb:2; 82 uint32_t portb:2;
83 uint32_t porta:2; 83 uint32_t porta:2;
84 uint32_t reserved0:2; 84 uint32_t reserved0:2;
85 uint32_t sequence:3; 85 uint32_t sequence:3;
86 uint32_t extended:1; 86 uint32_t extended:1;
87 uint32_t phy_id:6; 87 uint32_t phy_id:6;
88 uint32_t identifier:2; 88 uint32_t identifier:2;
89 } ext_self_id; 89 } ext_self_id;
90 }; 90 };
91 uint32_t inverted; 91 uint32_t inverted;
92 uint32_t ack; 92 uint32_t ack;
93}; 93};
94 94
95#define PHY_PACKET_CONFIGURATION 0x00 95#define PHY_PACKET_CONFIGURATION 0x00
@@ -97,98 +97,98 @@ struct phy_packet {
97#define PHY_PACKET_SELF_ID 0x02 97#define PHY_PACKET_SELF_ID 0x02
98 98
99struct link_packet { 99struct link_packet {
100 uint32_t timestamp; 100 uint32_t timestamp;
101 union { 101 union {
102 struct { 102 struct {
103 uint32_t priority:4; 103 uint32_t priority:4;
104 uint32_t tcode:4; 104 uint32_t tcode:4;
105 uint32_t rt:2; 105 uint32_t rt:2;
106 uint32_t tlabel:6; 106 uint32_t tlabel:6;
107 uint32_t destination:16; 107 uint32_t destination:16;
108 108
109 uint32_t offset_high:16; 109 uint32_t offset_high:16;
110 uint32_t source:16; 110 uint32_t source:16;
111 111
112 uint32_t offset_low; 112 uint32_t offset_low;
113 } common; 113 } common;
114 114
115 struct { 115 struct {
116 uint32_t common[3]; 116 uint32_t common[3];
117 uint32_t crc; 117 uint32_t crc;
118 } read_quadlet; 118 } read_quadlet;
119 119
120 struct { 120 struct {
121 uint32_t common[3]; 121 uint32_t common[3];
122 uint32_t data; 122 uint32_t data;
123 uint32_t crc; 123 uint32_t crc;
124 } read_quadlet_response; 124 } read_quadlet_response;
125 125
126 struct { 126 struct {
127 uint32_t common[3]; 127 uint32_t common[3];
128 uint32_t extended_tcode:16; 128 uint32_t extended_tcode:16;
129 uint32_t data_length:16; 129 uint32_t data_length:16;
130 uint32_t crc; 130 uint32_t crc;
131 } read_block; 131 } read_block;
132 132
133 struct { 133 struct {
134 uint32_t common[3]; 134 uint32_t common[3];
135 uint32_t extended_tcode:16; 135 uint32_t extended_tcode:16;
136 uint32_t data_length:16; 136 uint32_t data_length:16;
137 uint32_t crc; 137 uint32_t crc;
138 uint32_t data[0]; 138 uint32_t data[0];
139 /* crc and ack follows. */ 139 /* crc and ack follows. */
140 } read_block_response; 140 } read_block_response;
141 141
142 struct { 142 struct {
143 uint32_t common[3]; 143 uint32_t common[3];
144 uint32_t data; 144 uint32_t data;
145 uint32_t crc; 145 uint32_t crc;
146 } write_quadlet; 146 } write_quadlet;
147 147
148 struct { 148 struct {
149 uint32_t common[3]; 149 uint32_t common[3];
150 uint32_t extended_tcode:16; 150 uint32_t extended_tcode:16;
151 uint32_t data_length:16; 151 uint32_t data_length:16;
152 uint32_t crc; 152 uint32_t crc;
153 uint32_t data[0]; 153 uint32_t data[0];
154 /* crc and ack follows. */ 154 /* crc and ack follows. */
155 } write_block; 155 } write_block;
156 156
157 struct { 157 struct {
158 uint32_t common[3]; 158 uint32_t common[3];
159 uint32_t crc; 159 uint32_t crc;
160 } write_response; 160 } write_response;
161 161
162 struct { 162 struct {
163 uint32_t common[3]; 163 uint32_t common[3];
164 uint32_t data; 164 uint32_t data;
165 uint32_t crc; 165 uint32_t crc;
166 } cycle_start; 166 } cycle_start;
167 167
168 struct { 168 struct {
169 uint32_t sy:4; 169 uint32_t sy:4;
170 uint32_t tcode:4; 170 uint32_t tcode:4;
171 uint32_t channel:6; 171 uint32_t channel:6;
172 uint32_t tag:2; 172 uint32_t tag:2;
173 uint32_t data_length:16; 173 uint32_t data_length:16;
174 174
175 uint32_t crc; 175 uint32_t crc;
176 } iso_data; 176 } iso_data;
177 }; 177 };
178}; 178};
179 179
180struct subaction { 180struct subaction {
181 uint32_t ack; 181 uint32_t ack;
182 size_t length; 182 size_t length;
183 struct list link; 183 struct list link;
184 struct link_packet packet; 184 struct link_packet packet;
185}; 185};
186 186
187struct link_transaction { 187struct link_transaction {
188 int request_node, response_node, tlabel; 188 int request_node, response_node, tlabel;
189 struct subaction *request, *response; 189 struct subaction *request, *response;
190 struct list request_list, response_list; 190 struct list request_list, response_list;
191 struct list link; 191 struct list link;
192}; 192};
193 193
194int decode_fcp(struct link_transaction *t); 194int decode_fcp(struct link_transaction *t);