Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
b668917b
Commit
b668917b
authored
Sep 19, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
white-rabbit: fix stamp correct/incorrect for non-wr mode
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
06cb0670
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
hooks.c
proto-ext-whiterabbit/hooks.c
+3
-3
wrs-socket.c
time-wrs/wrs-socket.c
+7
-0
No files found.
proto-ext-whiterabbit/hooks.c
View file @
b668917b
...
...
@@ -115,14 +115,14 @@ static int wr_handle_resp(struct pp_instance *ppi)
cField_to_TimeInternal
(
&
correction_field
,
hdr
->
correctionfield
);
/*
* If no WR mode is on, run normal code, i
t T3 is
valid.
* If no WR mode is on, run normal code, i
f T2/T3 are
valid.
* After we adjusted the pps counter, stamps are invalid, so
* we'll have the Unix time instead, marked by "correct"
*/
if
(
!
WR_DSPOR
(
ppi
)
->
wrModeOn
)
{
if
(
!
ppi
->
t3
.
correct
)
{
if
(
!
ppi
->
t
2
.
correct
||
!
ppi
->
t
3
.
correct
)
{
pp_diag
(
ppi
,
servo
,
1
,
"T3 incorrect, discarding tuple
\n
"
);
"T
2 or T
3 incorrect, discarding tuple
\n
"
);
return
0
;
}
pp_servo_got_resp
(
ppi
);
...
...
time-wrs/wrs-socket.c
View file @
b668917b
...
...
@@ -31,6 +31,8 @@
#include <ppsi-wrs.h>
#include <hal_exports.h>
#include "../proto-ext-whiterabbit/wr-api.h"
extern
struct
minipc_pd
__rpcdef_get_port_state
;
#define ETHER_MTU 1518
...
...
@@ -219,6 +221,11 @@ int wrs_recv_msg(struct pp_instance *ppi, int fd, void *pkt, int _len,
t
->
raw_ahead
=
cntr_ahead
;
update_dmtd
(
s
,
ppi
->
iface_name
);
if
(
!
WR_DSPOR
(
ppi
)
->
wrModeOn
)
{
/* for non-wr-mode any reported stamp is correct */
t
->
correct
=
1
;
return
ret
;
}
if
(
s
->
dmtd_phase_valid
)
{
wrs_linearize_rx_timestamp
(
t
,
s
->
dmtd_phase
,
...
...
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