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
32
Issues
32
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
24fdc042
Commit
24fdc042
authored
Jan 09, 2013
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppsi: force a ptp stop/start in case of "no link" detected
Signed-off-by:
Aurelio Colosimo
<
aurelio@aureliocolosimo.it
>
parent
732449a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
wrc_ptp_ppsi.c
wrc_ptp_ppsi.c
+23
-1
No files found.
wrc_ptp_ppsi.c
View file @
24fdc042
...
...
@@ -21,7 +21,8 @@
#include "pps_gen.h"
#include "uart.h"
static
int
ptp_enabled
=
0
,
ptp_mode
=
WRC_MODE_UNKNOWN
;
static
int
ptp_enabled
=
0
,
ptp_mode
=
WRC_MODE_UNKNOWN
,
ptp_forced_stop
=
0
;
struct
pp_instance
ppi_static
;
/* FIXME: no more static, because used in
tests/measure_t24p.c */
int
pp_diag_verbosity
=
CONFIG_PPSI_VERBOSITY
;
...
...
@@ -39,6 +40,7 @@ static struct pp_frgn_master frgn_master;
static
int
delay_ms
=
PP_DEFAULT_NEXT_DELAY_MS
;
static
int
start_tics
=
0
;
static
int
last_link_up
=
0
;
int
wrc_ptp_init
()
{
...
...
@@ -165,6 +167,26 @@ int wrc_ptp_update()
int
i
;
struct
pp_instance
*
ppi
=
&
ppi_static
;
int
now_link_up
;
now_link_up
=
ep_link_up
(
NULL
);
if
(
last_link_up
!=
now_link_up
)
{
last_link_up
=
now_link_up
;
if
(
ptp_enabled
&&
(
!
now_link_up
))
{
wrc_ptp_stop
();
ptp_forced_stop
=
1
;
pp_printf
(
"Link down: PTP stop
\n
"
);
}
else
{
if
(
ptp_forced_stop
)
{
pp_printf
(
"Link up: PTP start
\n
"
);
ptp_forced_stop
=
0
;
wrc_ptp_start
();
}
}
}
if
(
ptp_enabled
)
{
static
unsigned
char
packet
[
500
];
...
...
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