Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
83ef7c75
Commit
83ef7c75
authored
Jul 22, 2010
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/firewire: nosy-dump: use linux/firewire-constants.h
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
269fe102
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
31 deletions
+11
-31
tools/firewire/decode-fcp.c
tools/firewire/decode-fcp.c
+4
-2
tools/firewire/nosy-dump.c
tools/firewire/nosy-dump.c
+4
-3
tools/firewire/nosy-dump.h
tools/firewire/nosy-dump.h
+3
-26
No files found.
tools/firewire/decode-fcp.c
View file @
83ef7c75
#include <
stdlib
.h>
#include <
linux/firewire-constants
.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include "list.h"
#include "list.h"
#include "nosy-dump.h"
#include "nosy-dump.h"
...
@@ -176,7 +178,7 @@ decode_fcp(struct link_transaction *t)
...
@@ -176,7 +178,7 @@ decode_fcp(struct link_transaction *t)
((
unsigned
long
long
)
t
->
request
->
packet
.
common
.
offset_high
<<
32
)
|
((
unsigned
long
long
)
t
->
request
->
packet
.
common
.
offset_high
<<
32
)
|
t
->
request
->
packet
.
common
.
offset_low
;
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
;
return
0
;
if
(
offset
==
CSR_FCP_COMMAND
||
offset
==
CSR_FCP_RESPONSE
)
{
if
(
offset
==
CSR_FCP_COMMAND
||
offset
==
CSR_FCP_RESPONSE
)
{
...
...
tools/firewire/nosy-dump.c
View file @
83ef7c75
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include <byteswap.h>
#include <byteswap.h>
#include <endian.h>
#include <endian.h>
#include <fcntl.h>
#include <fcntl.h>
#include <linux/firewire-constants.h>
#include <poll.h>
#include <poll.h>
#include <popt.h>
#include <popt.h>
#include <signal.h>
#include <signal.h>
...
@@ -522,8 +523,8 @@ handle_request_packet(uint32_t *data, size_t length)
...
@@ -522,8 +523,8 @@ handle_request_packet(uint32_t *data, size_t length)
switch
(
sa
->
ack
)
{
switch
(
sa
->
ack
)
{
case
ACK_COMPLETE
:
case
ACK_COMPLETE
:
if
(
p
->
common
.
tcode
!=
TCODE_WRITE_QUADLET
&&
if
(
p
->
common
.
tcode
!=
TCODE_WRITE_QUADLET
_REQUEST
&&
p
->
common
.
tcode
!=
TCODE_WRITE_BLOCK
)
p
->
common
.
tcode
!=
TCODE_WRITE_BLOCK
_REQUEST
)
/* error, unified transactions only allowed for write */
;
/* error, unified transactions only allowed for write */
;
list_remove
(
&
t
->
link
);
list_remove
(
&
t
->
link
);
handle_transaction
(
t
);
handle_transaction
(
t
);
...
@@ -967,7 +968,7 @@ int main(int argc, const char *argv[])
...
@@ -967,7 +968,7 @@ int main(int argc, const char *argv[])
filter
=
~
0
;
filter
=
~
0
;
if
(
!
option_iso
)
if
(
!
option_iso
)
filter
&=
~
(
1
<<
TCODE_
ISO
_DATA
);
filter
&=
~
(
1
<<
TCODE_
STREAM
_DATA
);
if
(
!
option_cycle_start
)
if
(
!
option_cycle_start
)
filter
&=
~
(
1
<<
TCODE_CYCLE_START
);
filter
&=
~
(
1
<<
TCODE_CYCLE_START
);
if
(
view
==
VIEW_STATS
)
if
(
view
==
VIEW_STATS
)
...
...
tools/firewire/nosy-dump.h
View file @
83ef7c75
...
@@ -3,36 +3,11 @@
...
@@ -3,36 +3,11 @@
#define array_length(array) (sizeof(array) / sizeof(array[0]))
#define array_length(array) (sizeof(array) / sizeof(array[0]))
#define TCODE_WRITE_QUADLET 0x0
#define ACK_NO_ACK 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_DONE(a) ((a >> 2) == 0)
#define ACK_DONE(a) ((a >> 2) == 0)
#define ACK_BUSY(a) ((a >> 2) == 1)
#define ACK_BUSY(a) ((a >> 2) == 1)
#define ACK_ERROR(a) ((a >> 2) == 3)
#define ACK_ERROR(a) ((a >> 2) == 3)
#define SPEED_100 0x0
#define SPEED_200 0x1
#define SPEED_400 0x2
#include <stdint.h>
#include <stdint.h>
struct
phy_packet
{
struct
phy_packet
{
...
@@ -92,6 +67,8 @@ struct phy_packet {
...
@@ -92,6 +67,8 @@ struct phy_packet {
uint32_t
ack
;
uint32_t
ack
;
};
};
#define TCODE_PHY_PACKET 0x10
#define PHY_PACKET_CONFIGURATION 0x00
#define PHY_PACKET_CONFIGURATION 0x00
#define PHY_PACKET_LINK_ON 0x01
#define PHY_PACKET_LINK_ON 0x01
#define PHY_PACKET_SELF_ID 0x02
#define PHY_PACKET_SELF_ID 0x02
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment