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
c034de96
Commit
c034de96
authored
Apr 05, 2024
by
Adam Wujek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE:
#54
] proto-ext-whiterabbit: fix behavior of ptp_fallback
Signed-off-by:
Adam Wujek
<
dev_public@wujek.eu
>
parent
8825ac3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
fsm.c
fsm.c
+1
-2
common-fun.c
proto-ext-whiterabbit/common-fun.c
+14
-1
No files found.
fsm.c
View file @
c034de96
...
...
@@ -361,8 +361,7 @@ void pdstate_disable_extension(struct pp_instance * ppi)
{
ppi
->
pdstate
=
PP_PDSTATE_FAILURE
;
if
(
ppi
->
extState
==
PP_EXSTATE_ACTIVE
)
{
if
(
ppi
->
ptp_fallback
)
ppi
->
extState
=
ppi
->
ptp_fallback
?
PP_EXSTATE_PTP
:
PP_EXSTATE_DISABLE
;
ppi
->
extState
=
PP_EXSTATE_PTP
;
pp_servo_init
(
ppi
);
// Reinitialize the servo
if
(
is_ext_hook_available
(
ppi
,
extension_state_changed
)
)
ppi
->
ext_hooks
->
extension_state_changed
(
ppi
);
...
...
proto-ext-whiterabbit/common-fun.c
View file @
c034de96
...
...
@@ -29,9 +29,22 @@ void wr_handshake_fail(struct pp_instance *ppi)
{
struct
wr_dsport
*
wrp
=
WR_DSPOR
(
ppi
);
wrp
->
next_state
=
WRS_IDLE
;
/* Don't use PTP without WR, try WR one more time */
if
(
!
ppi
->
ptp_fallback
)
{
wrh_servo_t
*
s
=
WRH_SRV
(
ppi
);
if
(
s
)
s
->
doRestart
=
TRUE
;
pp_diag
(
ppi
,
ext
,
1
,
"Handshake failure: PTP fallback disabled."
" Try WR again as %s
\n
"
,
wrp
->
wrMode
==
WR_MASTER
?
"master"
:
"slave"
);
return
;
}
pp_diag
(
ppi
,
ext
,
1
,
"Handshake failure: now non-wr %s
\n
"
,
wrp
->
wrMode
==
WR_MASTER
?
"master"
:
"slave"
);
wrp
->
next_state
=
WRS_IDLE
;
wr_reset_process
(
ppi
,
WR_ROLE_NONE
);
wr_servo_reset
(
ppi
);
pdstate_disable_extension
(
ppi
);
...
...
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