tools/firewire: nosy-dump: use linux/firewire-constants.h

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+11 -31
+4 -2
tools/firewire/decode-fcp.c
··· 1 - #include <stdlib.h> 1 + #include <linux/firewire-constants.h> 2 2 #include <stdio.h> 3 + #include <stdlib.h> 4 + 3 5 #include "list.h" 4 6 #include "nosy-dump.h" 5 7 ··· 178 176 ((unsigned long long) t->request->packet.common.offset_high << 32) | 179 177 t->request->packet.common.offset_low; 180 178 181 - if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK) 179 + if (t->request->packet.common.tcode != TCODE_WRITE_BLOCK_REQUEST) 182 180 return 0; 183 181 184 182 if (offset == CSR_FCP_COMMAND || offset == CSR_FCP_RESPONSE) {
+4 -3
tools/firewire/nosy-dump.c
··· 20 20 #include <byteswap.h> 21 21 #include <endian.h> 22 22 #include <fcntl.h> 23 + #include <linux/firewire-constants.h> 23 24 #include <poll.h> 24 25 #include <popt.h> 25 26 #include <signal.h> ··· 523 522 524 523 switch (sa->ack) { 525 524 case ACK_COMPLETE: 526 - if (p->common.tcode != TCODE_WRITE_QUADLET && 527 - p->common.tcode != TCODE_WRITE_BLOCK) 525 + if (p->common.tcode != TCODE_WRITE_QUADLET_REQUEST && 526 + p->common.tcode != TCODE_WRITE_BLOCK_REQUEST) 528 527 /* error, unified transactions only allowed for write */; 529 528 list_remove(&t->link); 530 529 handle_transaction(t); ··· 968 967 969 968 filter = ~0; 970 969 if (!option_iso) 971 - filter &= ~(1 << TCODE_ISO_DATA); 970 + filter &= ~(1 << TCODE_STREAM_DATA); 972 971 if (!option_cycle_start) 973 972 filter &= ~(1 << TCODE_CYCLE_START); 974 973 if (view == VIEW_STATS)
+3 -26
tools/firewire/nosy-dump.h
··· 3 3 4 4 #define array_length(array) (sizeof(array) / sizeof(array[0])) 5 5 6 - #define TCODE_WRITE_QUADLET 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 - 6 + #define ACK_NO_ACK 0x0 28 7 #define ACK_DONE(a) ((a >> 2) == 0) 29 8 #define ACK_BUSY(a) ((a >> 2) == 1) 30 9 #define ACK_ERROR(a) ((a >> 2) == 3) 31 - 32 - #define SPEED_100 0x0 33 - #define SPEED_200 0x1 34 - #define SPEED_400 0x2 35 10 36 11 #include <stdint.h> 37 12 ··· 66 91 uint32_t inverted; 67 92 uint32_t ack; 68 93 }; 94 + 95 + #define TCODE_PHY_PACKET 0x10 69 96 70 97 #define PHY_PACKET_CONFIGURATION 0x00 71 98 #define PHY_PACKET_LINK_ON 0x01