Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wrpc-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
hdl-core-lib
wr-cores
wrpc-sw
Commits
d1075ac1
Commit
d1075ac1
authored
12 years ago
by
Grzegorz Daniluk
Browse files
Options
Downloads
Patches
Plain Diff
minic: use only fid 0 for ptp packets, rest is for wr-nic
parent
978b79c2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dev/minic.c
+3
-6
3 additions, 6 deletions
dev/minic.c
include/minic.h
+1
-0
1 addition, 0 deletions
include/minic.h
with
4 additions
and
6 deletions
dev/minic.c
+
3
−
6
View file @
d1075ac1
...
...
@@ -265,7 +265,6 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
}
static
uint16_t
tx_oob_val
=
0
;
int
minic_tx_frame
(
uint8_t
*
hdr
,
uint8_t
*
payload
,
uint32_t
size
,
struct
hw_timestamp
*
hwts
)
{
...
...
@@ -286,7 +285,7 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
d_hdr
=
0
;
if
(
hwts
)
d_hdr
=
TX_DESC_WITH_OOB
|
(
tx_oob_val
<<
12
);
d_hdr
=
TX_DESC_WITH_OOB
|
(
WRPC_FID
<<
12
);
d_hdr
|=
TX_DESC_VALID
|
nwords
;
...
...
@@ -311,9 +310,9 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
raw_ts
=
minic_readl
(
MINIC_REG_TSR1
);
fid
=
MINIC_TSR0_FID_R
(
minic_readl
(
MINIC_REG_TSR0
));
if
(
fid
!=
tx_oob_val
)
if
(
fid
!=
WRPC_FID
)
{
TRACE_DEV
(
"minic_tx_frame: unmatched fid %d vs %d
\n
"
,
fid
,
tx_oob_val
);
TRACE_DEV
(
"minic_tx_frame: unmatched fid %d vs %d
\n
"
,
fid
,
WRPC_FID
);
}
EXPLODE_WR_TIMESTAMP
(
raw_ts
,
counter_r
,
counter_f
);
...
...
@@ -331,8 +330,6 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
minic
.
tx_count
++
;
}
tx_oob_val
++
;
return
size
;
}
...
...
This diff is collapsed.
Click to expand it.
include/minic.h
+
1
−
0
View file @
d1075ac1
...
...
@@ -4,6 +4,7 @@
#include
"types.h"
#define ETH_HEADER_SIZE 14
#define WRPC_FID 0
void
minic_init
();
void
minic_disable
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment