Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
31
Issues
31
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
d1075ac1
Commit
d1075ac1
authored
Sep 25, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minic: use only fid 0 for ptp packets, rest is for wr-nic
parent
978b79c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
minic.c
dev/minic.c
+3
-6
minic.h
include/minic.h
+1
-0
No files found.
dev/minic.c
View file @
d1075ac1
...
@@ -265,7 +265,6 @@ int minic_rx_frame(uint8_t *hdr, uint8_t *payload, uint32_t buf_size, struct hw_
...
@@ -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
)
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
...
@@ -286,7 +285,7 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
d_hdr
=
0
;
d_hdr
=
0
;
if
(
hwts
)
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
;
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
...
@@ -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
);
raw_ts
=
minic_readl
(
MINIC_REG_TSR1
);
fid
=
MINIC_TSR0_FID_R
(
minic_readl
(
MINIC_REG_TSR0
));
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
);
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
...
@@ -331,8 +330,6 @@ int minic_tx_frame(uint8_t *hdr, uint8_t *payload, uint32_t size, struct hw_time
minic
.
tx_count
++
;
minic
.
tx_count
++
;
}
}
tx_oob_val
++
;
return
size
;
return
size
;
}
}
...
...
include/minic.h
View file @
d1075ac1
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include "types.h"
#include "types.h"
#define ETH_HEADER_SIZE 14
#define ETH_HEADER_SIZE 14
#define WRPC_FID 0
void
minic_init
();
void
minic_init
();
void
minic_disable
();
void
minic_disable
();
...
...
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