aboutsummaryrefslogtreecommitdiff
path: root/tools/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firewire')
-rw-r--r--tools/firewire/decode-fcp.c6
-rw-r--r--tools/firewire/nosy-dump.c7
-rw-r--r--tools/firewire/nosy-dump.h29
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 @@
-#include <stdlib.h>
+#include <linux/firewire-constants.h>
#include <stdio.h>
+#include <stdlib.h>
+
#include "list.h"
#include "nosy-dump.h"
@@ -176,7 +178,7 @@ decode_fcp(struct link_transaction *t)
((unsigned long long) t->request->packet.common.offset_high << 32) |
t->request->packet.common.offset_low;
- if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK)
+ if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK_REQUEST)
return 0;
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 @@
#include <byteswap.h>
#include <endian.h>
#include <fcntl.h>
+#include <linux/firewire-constants.h>
#include <poll.h>
#include <popt.h>
#include <signal.h>
@@ -522,8 +523,8 @@ handle_request_packet(uint32_t *data, size_t length)
switch (sa->ack) {
case ACK_COMPLETE:
- if (p->common.tcode != TCODE_WRITE_QUADLET &&
- p->common.tcode != TCODE_WRITE_BLOCK)
+ if (p->common.tcode != TCODE_WRITE_QUADLET_REQUEST &&
+ p->common.tcode != TCODE_WRITE_BLOCK_REQUEST)
/* error, unified transactions only allowed for write */;
list_remove(&t->link);
handle_transaction(t);
@@ -967,7 +968,7 @@ int main(int argc, const char *argv[])
filter = ~0;
if (!option_iso)
- filter &= ~(1 << TCODE_ISO_DATA);
+ filter &= ~(1 << TCODE_STREAM_DATA);
if (!option_cycle_start)
filter &= ~(1 << TCODE_CYCLE_START);
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 @@
#define array_length(array) (sizeof(array) / sizeof(array[0]))
-#define TCODE_WRITE_QUADLET 0x0
-#define TCODE_WRITE_BLOCK 0x1
-#define TCODE_WRITE_RESPONSE 0x2
-#define TCODE_READ_QUADLET 0x4
-#define TCODE_READ_BLOCK 0x5
-#define TCODE_READ_QUADLET_RESPONSE 0x6
-#define TCODE_READ_BLOCK_RESPONSE 0x7
-#define TCODE_CYCLE_START 0x8
-#define TCODE_LOCK_REQUEST 0x9
-#define TCODE_ISO_DATA 0xa
-#define TCODE_LOCK_RESPONSE 0xb
-#define TCODE_PHY_PACKET 0x10
-
-#define ACK_NO_ACK 0x0
-#define ACK_COMPLETE 0x1
-#define ACK_PENDING 0x2
-#define ACK_BUSY_X 0x4
-#define ACK_BUSY_A 0x5
-#define ACK_BUSY_B 0x6
-#define ACK_DATA_ERROR 0xd
-#define ACK_TYPE_ERROR 0xe
-
+#define ACK_NO_ACK 0x0
#define ACK_DONE(a) ((a >> 2) == 0)
#define ACK_BUSY(a) ((a >> 2) == 1)
#define ACK_ERROR(a) ((a >> 2) == 3)
-#define SPEED_100 0x0
-#define SPEED_200 0x1
-#define SPEED_400 0x2
-
#include <stdint.h>
struct phy_packet {
@@ -92,6 +67,8 @@ struct phy_packet {
uint32_t ack;
};
+#define TCODE_PHY_PACKET 0x10
+
#define PHY_PACKET_CONFIGURATION 0x00
#define PHY_PACKET_LINK_ON 0x01
#define PHY_PACKET_SELF_ID 0x02