diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/firewire/decode-fcp.c | 6 | ||||
-rw-r--r-- | tools/firewire/nosy-dump.c | 7 | ||||
-rw-r--r-- | tools/firewire/nosy-dump.h | 29 |
3 files changed, 11 insertions, 31 deletions
diff --git a/tools/firewire/decode-fcp.c b/tools/firewire/decode-fcp.c index 9cd1550db24a..e41223b6a4c8 100644 --- a/tools/firewire/decode-fcp.c +++ b/tools/firewire/decode-fcp.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #include <stdlib.h> | 1 | #include <linux/firewire-constants.h> |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <stdlib.h> | ||
4 | |||
3 | #include "list.h" | 5 | #include "list.h" |
4 | #include "nosy-dump.h" | 6 | #include "nosy-dump.h" |
5 | 7 | ||
@@ -176,7 +178,7 @@ decode_fcp(struct link_transaction *t) | |||
176 | ((unsigned long long) t->request->packet.common.offset_high << 32) | | 178 | ((unsigned long long) t->request->packet.common.offset_high << 32) | |
177 | t->request->packet.common.offset_low; | 179 | t->request->packet.common.offset_low; |
178 | 180 | ||
179 | if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK) | 181 | if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK_REQUEST) |
180 | return 0; | 182 | return 0; |
181 | 183 | ||
182 | if (offset == CSR_FCP_COMMAND || offset == CSR_FCP_RESPONSE) { | 184 | if (offset == CSR_FCP_COMMAND || offset == CSR_FCP_RESPONSE) { |
diff --git a/tools/firewire/nosy-dump.c b/tools/firewire/nosy-dump.c index 32c48556170b..5241cb402d6b 100644 --- a/tools/firewire/nosy-dump.c +++ b/tools/firewire/nosy-dump.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <byteswap.h> | 20 | #include <byteswap.h> |
21 | #include <endian.h> | 21 | #include <endian.h> |
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | #include <linux/firewire-constants.h> | ||
23 | #include <poll.h> | 24 | #include <poll.h> |
24 | #include <popt.h> | 25 | #include <popt.h> |
25 | #include <signal.h> | 26 | #include <signal.h> |
@@ -522,8 +523,8 @@ handle_request_packet(uint32_t *data, size_t length) | |||
522 | 523 | ||
523 | switch (sa->ack) { | 524 | switch (sa->ack) { |
524 | case ACK_COMPLETE: | 525 | case ACK_COMPLETE: |
525 | if (p->common.tcode != TCODE_WRITE_QUADLET && | 526 | if (p->common.tcode != TCODE_WRITE_QUADLET_REQUEST && |
526 | p->common.tcode != TCODE_WRITE_BLOCK) | 527 | p->common.tcode != TCODE_WRITE_BLOCK_REQUEST) |
527 | /* error, unified transactions only allowed for write */; | 528 | /* error, unified transactions only allowed for write */; |
528 | list_remove(&t->link); | 529 | list_remove(&t->link); |
529 | handle_transaction(t); | 530 | handle_transaction(t); |
@@ -967,7 +968,7 @@ int main(int argc, const char *argv[]) | |||
967 | 968 | ||
968 | filter = ~0; | 969 | filter = ~0; |
969 | if (!option_iso) | 970 | if (!option_iso) |
970 | filter &= ~(1 << TCODE_ISO_DATA); | 971 | filter &= ~(1 << TCODE_STREAM_DATA); |
971 | if (!option_cycle_start) | 972 | if (!option_cycle_start) |
972 | filter &= ~(1 << TCODE_CYCLE_START); | 973 | filter &= ~(1 << TCODE_CYCLE_START); |
973 | if (view == VIEW_STATS) | 974 | if (view == VIEW_STATS) |
diff --git a/tools/firewire/nosy-dump.h b/tools/firewire/nosy-dump.h index fe8be630efaa..3a4b5b33ba5d 100644 --- a/tools/firewire/nosy-dump.h +++ b/tools/firewire/nosy-dump.h | |||
@@ -3,36 +3,11 @@ | |||
3 | 3 | ||
4 | #define array_length(array) (sizeof(array) / sizeof(array[0])) | 4 | #define array_length(array) (sizeof(array) / sizeof(array[0])) |
5 | 5 | ||
6 | #define TCODE_WRITE_QUADLET 0x0 | 6 | #define ACK_NO_ACK 0x0 |
7 | #define TCODE_WRITE_BLOCK 0x1 | ||
8 | #define TCODE_WRITE_RESPONSE 0x2 | ||
9 | #define TCODE_READ_QUADLET 0x4 | ||
10 | #define TCODE_READ_BLOCK 0x5 | ||
11 | #define TCODE_READ_QUADLET_RESPONSE 0x6 | ||
12 | #define TCODE_READ_BLOCK_RESPONSE 0x7 | ||
13 | #define TCODE_CYCLE_START 0x8 | ||
14 | #define TCODE_LOCK_REQUEST 0x9 | ||
15 | #define TCODE_ISO_DATA 0xa | ||
16 | #define TCODE_LOCK_RESPONSE 0xb | ||
17 | #define TCODE_PHY_PACKET 0x10 | ||
18 | |||
19 | #define ACK_NO_ACK 0x0 | ||
20 | #define ACK_COMPLETE 0x1 | ||
21 | #define ACK_PENDING 0x2 | ||
22 | #define ACK_BUSY_X 0x4 | ||
23 | #define ACK_BUSY_A 0x5 | ||
24 | #define ACK_BUSY_B 0x6 | ||
25 | #define ACK_DATA_ERROR 0xd | ||
26 | #define ACK_TYPE_ERROR 0xe | ||
27 | |||
28 | #define ACK_DONE(a) ((a >> 2) == 0) | 7 | #define ACK_DONE(a) ((a >> 2) == 0) |
29 | #define ACK_BUSY(a) ((a >> 2) == 1) | 8 | #define ACK_BUSY(a) ((a >> 2) == 1) |
30 | #define ACK_ERROR(a) ((a >> 2) == 3) | 9 | #define ACK_ERROR(a) ((a >> 2) == 3) |
31 | 10 | ||
32 | #define SPEED_100 0x0 | ||
33 | #define SPEED_200 0x1 | ||
34 | #define SPEED_400 0x2 | ||
35 | |||
36 | #include <stdint.h> | 11 | #include <stdint.h> |
37 | 12 | ||
38 | struct phy_packet { | 13 | struct phy_packet { |
@@ -92,6 +67,8 @@ struct phy_packet { | |||
92 | uint32_t ack; | 67 | uint32_t ack; |
93 | }; | 68 | }; |
94 | 69 | ||
70 | #define TCODE_PHY_PACKET 0x10 | ||
71 | |||
95 | #define PHY_PACKET_CONFIGURATION 0x00 | 72 | #define PHY_PACKET_CONFIGURATION 0x00 |
96 | #define PHY_PACKET_LINK_ON 0x01 | 73 | #define PHY_PACKET_LINK_ON 0x01 |
97 | #define PHY_PACKET_SELF_ID 0x02 | 74 | #define PHY_PACKET_SELF_ID 0x02 |